-
My sitemap is configured but it’s giving 404, what do I do?
-
Hello,
We apologize for the issue you are facing with your sitemap returning a 404 error. Here are some steps you can take to resolve this:
-
Flush Permalinks: Go to your WordPress admin area, navigate to Settings → Permalinks, and hit the “Save Changes” button. This can often resolve 404 errors related to sitemaps.

-
Check Server Configuration: Ensure that your web server is configured correctly to handle the sitemap requests. If you are using Apache, you may need to add specific rewrite rules to your
.htaccessfile. For Nginx, similar rules should be added to your Nginx config file. -
Validate Your Sitemap: Use a tool like the Validate XML Sitemap to check if your sitemap is correctly configured.

-
Ensure Sitemap Location: Make sure your sitemap is located in the root folder of your WordPress installation. The URL should look like this:
https://yourdomainname.com/sitemap_index.xml. -
Check for Content: If all your posts are set to noindex, your sitemap may appear empty. Ensure that your posts are set to index by going to Rank Math SEO → Titles & Meta and enabling the Index checkbox.

If these steps do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank MathHello,
Could you please share the sitemap URL so we can check as well?
Meanwhile, please follow these steps to flush your sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp2. 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/3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on 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/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.
-
The ticket ‘my sitemap is configured but it is giving 404’ is closed to new replies.