Sitemap not working

#1095285
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    We apologize for the issue you are facing with your sitemap showing a 404 error. This can happen for a few reasons, and we can help you troubleshoot it.

    Here are some steps you can take to resolve the 404 error:

    1. Flush Permalinks: Go to your WordPress admin area and navigate to Settings → Permalinks. Click the “Save Changes” button once, even if you didn’t make any changes. This often resolves issues with permalinks and sitemap generation.
      Flush permalink settings

    2. Check .htaccess File: If you are using an Apache server, ensure that your .htaccess file has the correct rewrite rules for Rank Math. You can add the following code:

      # START of Rank Math Sitemap Rewrite Rules
      RewriteEngine On
      RewriteBase /
      RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
      RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
      RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
      # END of Rank Math Sitemap Rewrite Rules
    3. Nginx Configuration: If you are using Nginx, ensure that your Nginx config file has the appropriate rewrite rules:

      # START Nginx Rewrites for Rank Math Sitemaps
      rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
      rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
      rewrite ^/([a-z]+)?-sitemap.xsl$ /index.php?xsl=$1 last;
      # END Nginx Rewrites for Rank Math Sitemaps
    4. Check for Plugin Conflicts: Sometimes, other plugins can conflict with Rank Math. You can use the Health Check plugin to identify any conflicts.

    5. Ensure Your Posts Are Set to Index: Make sure that your posts are not set to noindex. Go to Rank Math SEO → Titles & Meta and check the Robots Meta settings to ensure the Index checkbox is enabled.
      Index Titles and Meta settings

    If these steps do not resolve the issue, please reply to this ticket with any additional details or errors you may be encountering, and a human agent from our support team will assist you further. Thank you for your patience!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math

    Hello,

    It seems that you already marked this ticket as “Resolved”.

    Do you still need our assistance regarding this issue?

    Looking forward to helping you.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this ticket.