Google couldn’t fetch sitemap

#908172
  • Resolved Jason Rood
    Rank Math free

    Hello,
    I’m trying to setup SEO and I’m at the point where I need to upload my sitemap to google, but when I upload it and then refresh the page, I get this error message. https://imgur.com/a/KBX8CPr
    I noticed on my websites dashboard it says “Since you are using an NGINX server, you may need to add the following code to your configuration file if your Sitemap pages are not loading. If you are unsure how to do it, please contact your hosting provider. Click here to see the code”. I don’t know how to do this, so I’m hoping someone here can.

    Thank you,
    Jason

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

    We apologize for the issue you are facing with Google not being able to fetch your sitemap. The error you are encountering can often be resolved by ensuring that your NGINX server is properly configured to handle the sitemap requests.

    Since you mentioned that you are using an NGINX server, you will need to add specific rewrite rules to your NGINX configuration file. Here’s the code you should add:

    # 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

    You can ask your hosting provider to assist you with adding this code to your NGINX configuration file if you’re unsure how to do it yourself. Once the changes are made, make sure to restart your NGINX server for the changes to take effect.

    After that, try submitting your sitemap again in Google Search Console. If you continue to experience issues, please feel free to reply to this ticket, and a human agent from our support team will assist you further.

    Thank you for raising this concern, and we hope this helps resolve the issue!

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

    Hello,

    Can you please share your sitemap URL with us so that we can check the issue further for you?

    Meanwhile, please try to follow the steps below and see if that works for you:

    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/

    Once done, clear your website cache, remove all the submitted sitemap, and resubmit only the /sitemap_index.xml in the Search Console.

    If the issue persists, please try to follow this guideline for further troubleshooting: https://rankmath.com/kb/couldnt-fetch-error-google-search-console/

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

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Google couldn’t fetch sitemap’ is closed to new replies.