Hello,
We apologize for the issue you are facing with your Rank Math sitemap returning a 404 error. This can happen for several reasons. Here are some steps you can take to troubleshoot and potentially resolve the issue:
-
Permalink Structure: If you have recently changed your permalink structure, ensure that your sitemap is updated accordingly.
-
Rewrite Rules: Check if you are using an NGINX or Apache server and make sure the correct rewrite rules are in place.
-
Caching Issues: If you are using a caching plugin, ensure that the sitemap_index.xml
file is excluded from caching. Sometimes server-level caching can also affect the sitemap.
-
Check Robots Meta Tag: Ensure that the pages you want indexed are set to index in the robots meta tag. You can check this by navigating to Rank Math SEO → Advanced tab in the post editing screen.
If you’ve gone through these steps and the issue persists, please reply to this ticket with your site URL so we can assist you further. Thank you for raising this concern!
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.
Hello,
Thank you for contacting us and sorry for any inconvenience that this issue might have caused.
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/
3. If the above steps don’t seem to work, kindly apply the following filter to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add a filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Once done, clear your website cache and check the sitemap again.
Let us know how it goes. Looking forward to helping you.
Thank you.
Hi Adetayo,
I did try to do step 1, based on your screenshare recording however I already got stuck on step 1. When going to ‘Rank Math SEO’ on the left then clicking ‘Sitemap Settings’ under the general option I don’t see an option for ‘Links per sitemap’
The only options I see here are:
-Images in Sitemaps
-Include Featured Images
Kind Regards,
Rob