Product Category Sitemap Returning a 404

#958602
Viewing 15 replies - 1 through 15 (of 16 total)
  • Hello, we apologize for the issue you are facing with the product category sitemap returning a 404 error. Here are some steps you can take to resolve this issue:

    1. Flush Permalinks

    Sometimes, a simple flush of the permalinks can resolve 404 errors. To do this:

    • Go to your WordPress admin area.
    • Navigate to Settings → Permalinks.
    • Click the Save Changes button without making any changes.

    Flush permalink settings

    2. Check Sitemap Settings

    Ensure that your product categories are enabled in the sitemap settings:

    • Go to Rank Math SEO → Sitemap Settings.
    • Make sure that the product categories are set to be included in the sitemap.

    3. Verify Sitemap URL

    Make sure that the sitemap URL is correct. The standard format for Rank Math sitemaps is usually `https://rankmath.com/wp-content/uploads/2021/09/Flush-Permalinks-Settings.jpg. You can check if your main sitemap index is accessible and if it includes links to your product category sitemap.

    4. Check for Plugin Conflicts

    If the above steps do not resolve the issue, there may be a plugin conflict. You can use the Health Check plugin to troubleshoot this.

    If you continue to experience issues after trying these steps, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    1) I flushed permalinks
    2) I checked sitemap setting and product category is enabled
    3) I verified the sitemap URL and the sitemap URL I am referring to is correct
    4) All sitemap URLs are excluded from caching plugin
    5) Plugins have not changed since the last time that sitemap URL was working

    Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    To investigate this issue further, we might need to take a closer look at your website and settings. Please follow these steps:

    • Edit the first post on this ticket and include your WordPress and FTP logins in the Sensitive Data section. This is a secure section that only our support staff can access.
      Sensitive Data Section
    • Make sure you take a complete backup of your website before sharing the information with us.
    • If you prefer, you can use this plugin to generate a temporary login URL to your website and share that with us instead: https://wordpress.org/plugins/temporary-login-without-password/
    • You can also use this plugin to monitor what changes our staff might make on your website (if any): https://wordpress.org/plugins/wp-security-audit-log/

    We appreciate your cooperation and patience.

    Thank you for choosing Rank Math.

    Isn’t there another way to figure this out?

    Hello,

    The two conditions where a page/post/CPT/taxonomy will be excluded from the sitemap automatically is if they are set to noindex or have custom canonical URLs. Also for taxonomy pages our plugin excludes them from the sitemap if they are empty.

    We have checked some product category pages on your site and can confirm that they are set to index, contain products, and have canonical URLs.

    Please confirm if you have entered the self-referencing canonical URLs manually and have not let Rank Math generate them by default. If you have, please remove the custom canonical URLs and flush your sitemap: https://i.rankmath.com/pipRDp

    If the issue persists we might need to take a closer look at your site.

    If you can not share your live site access, you can create a staging site and share its access with us instead.

    You can follow this guide to create a staging site: https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    I supplied you with the login credentials so that this issue can be resolved. Thank you.

    Hello,

    We deeply apologize for the unexpected delay in response. This ticket has been stuck in our drafts section for some reason.

    We tried to check your website but both /wp-admin and /wp-login.php getting redirected to your homepage. Please share the login URL of your website so that we can check the issue further for you.

    However, please note that if you’ve added any custom canonical from the Rank Math SEO Meta box Advanced tab, Rank Math will not include this in your sitemap.

    You can leave the Canonical URL field blank so that Rank Math can generate a self-referencing canonical URL automatically.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    It might help if you read my support ticket from 5 months 3 weeks ago titled “Canonical after removing product-category from base URL”

    Hello,

    We checked your website and looks like you’re using an external plugin on your website to change the permalink of your product categories.

    But it seems like this plugin is changing the permalink on the fly because when you try to access the categories from the product category list page, it shows the actual URL. Please check the screenshot in the sensitive data section for your reference.

    That’s why Rank Math is also using the actual permalink of your category pages.

    In this case, if you want, you can disable that plugin and use the Rank Math WooCommerce module to remove the category base and parent base.

    For more details, you can check this URL: https://rankmath.com/blog/woocommerce-seo/

    This way you can achieve the desired permalink and Rank Math will also generate the self-referencing canonical URL.

    Alternatively, you can use the following filter on your website to force Rank Math to generate the self-referencing canonical URL:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
        $current_url= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
        $canonical = $current_url;
        return $canonical;
    });
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Once done, you can remove the canonical from the Rank Math SEO Meta box Advanced tab, and after that, the category URLs will be automatically added to your sitemap but the original URL.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    This issue is still not resolved. I look forward to your assistance.

    Hello. Any luck?

    Hello,

    We deeply apologize for the unexpected delay in response. This ticket has been stuck in our drafts section for some reason.

    We enabled the WooCommerce module in Rank Math and enabled the Remove category base and Remove parent slugs option. Now, the parent category slugs are no longer showing on your product category pages and the canonical URLs are also getting generated properly.

    Also, your product category sitemap is now working properly without any issues:

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Ooops, I didn’t see your last message. Thank you for resolving the issue. That’s awesome. You rock!

Viewing 15 replies - 1 through 15 (of 16 total)

The ticket ‘Product Category Sitemap Returning a 404’ is closed to new replies.