sitemap_index.xml showing 404

#1110824
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    We apologize for the issue you are facing with your sitemap_index.xml showing a 404 error. This error typically indicates that the sitemap file cannot be found, which can happen for several reasons. Here are some steps you can take to troubleshoot and fix this issue:

    1. Flush the Sitemap Cache: Go to Rank Math SEO → Sitemap Settings and change the Links Per Sitemap setting. After saving the changes, navigate to Settings → Permalinks in your WordPress admin area and click Save Changes to flush the permalinks.
      Links Per Sitemap
      Permalink Settings in WordPress

    2. Check Permalink Structure: If you have recently changed your permalink structure, ensure that it is updated correctly.

    3. Rewrite Rules: If you are using an NGINX or Apache server, ensure that the correct rewrite rules are in place. You may need to add the following rules to your .htaccess file for Apache:

      # 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

      For NGINX, use:

      # 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. Caching Plugins: If you are using a caching plugin, ensure that the sitemap_index.xml file is excluded from caching. This is crucial as caching can prevent the sitemap from updating correctly.

    5. Ensure Pages Are Set to Index: Check that your posts and pages are set to index in the robots meta tag. Pages set to noindex will not appear in the sitemap.
      set to noindex

    If you have tried these steps and the issue persists, 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 bringing this to our attention!

    Sources:
    Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    https://adhvikaforgetech.com/sitemap_index.xml

    It was working for sometime and then after sometime its giving 404

    Any update?

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    Please follow the steps below for initial troubleshooting:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article: https://rankmath.com/kb/exclude-sitemaps-from-caching/

    If the issue persists then try disabling the transient cache for the sitemap. This will make sure that your XML sitemap always reflects the latest changes on your site. Kindly add this code snippet to your site:

    
    /** 
     * Filter if XML sitemap transient cache is enabled.
     *
     * @param boolean $unsigned Enable cache or not, defaults to true
     */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    If you’re not sure how to add this code, you can follow this guide: https://rankmath.com/kb/wordpress-hooks-actions-filters/.

    After you add the code, please clear any cache on your site or server and check your XML sitemap again. If you’re still facing issues with the sitemap, please let us know – we are happy to investigate further.

    Dear Rank Math Support Team,

    I recently migrated my WordPress website from All in One SEO Premium to Rank Math (trial version) due to persisting sitemap and crawling issues in Google Search Console. I have carefully followed all troubleshooting steps provided in your official documentation and community support, including:

    Flushing permalinks

    Clearing all caches (LiteSpeed and autooptimze)

    Verifying sitemap configuration and inclusion of all post types

    Ensuring .htaccess added given code

    Excluding sitemaps from caching plugins

    Please advise further, as I am unable to resolve this problem even after meticulously following all the suggested steps on your knowledge base.

    Thank you for your assistance.

    Best regards,
    Aman Singh
    +91-9916327866

    Hello,

    We checked the index sitemap and sub-sitemaps, and they are opening and validating correctly.

    If the issue persists, please clear your browser cache and check again.

    Let us know how it goes. We look forward to hearing from you.

    Thank you.

    Its been 3 days and no reply yet. Seems support i wont get

    Hello,

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

    Please note that the Discovered URLs 0 that you see in Google Search Console just means that the URLs in the sitemap were already found by Googlebot by other means, instead of via the sitemap. For example, Googlebot may have found the URLs from internal links or possibly from links on another site. It mostly happens when you have good internal linking or use the Instant Indexing plugin.

    Here’s a link you can check for more information:
    https://rankmath.com/kb/zero-discovered-urls-through-sitemap/

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

    Thank you.

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

You must be logged in to reply to this ticket.