Hello,
We apologize for the inconvenience you’re experiencing with the sitemap index after changing the site URL. We understand the importance of ensuring that your sitemap functions correctly, especially during a transition period.
To address this issue, we recommend following these steps to ensure the correct functioning of the sitemap index:
-
Validate Your Sitemap: Enter your sitemap URL into the Validate XML Sitemap tool to confirm that it is correctly configured. Once done, click VALIDATE SITEMAP to ensure there are no issues detected.
-
Ensure the Sitemap is Located in the Root Folder: If you manually created the sitemap, ensure it is installed in the root folder of your WordPress installation. The correct format for the sitemap URL should be `https://premium.wpmudev.org/blog/w3-total-cache-settings/#uaGroups?utm_campaign=RankMath
-
Check for Plugin or Theme Conflicts: Use the Health Check plugin to determine if there is a conflict with another plugin or theme that might be causing the blank page issue.
-
Exclude Sitemaps from Caching: If you are using a caching plugin, consider excluding the sitemaps from caching by following the steps outlined in this guide.
If after following these steps you are still facing issues with the sitemap index, please feel free to reach out to our support team directly from here by assigning this ticket to our support staff. We are available 24x7x365 and will be happy to assist you further.
We appreciate your patience and understanding as we work to resolve this issue for you.
Best regards.
Sources:
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
Rank Math Sitemap Issues and Their Fixes » Rank Math
How to Configure Sitemaps in Rank Math – Best Settings and Tips
Hello,
If the issue persists, please follow the steps to flush the sitemap cache:
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. 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/
Let us know how this goes.
Thanks Reinelle!
I’ve tried all the suggested solutions.
As I understand it, RankMath uses SITE Address (URL) or ‘home’ as a default for the sitemap index. When I change it to something else, it doesn’t seem to work.
My question is, when the WordPress Address (URL) and SITE Address (URL) are different, how can I make RankMath work?
Dat
Hello,
Please add this filter to your website to disable URL check:
/**
* Filter whether we need to check for URL mismatch or not.
*/
add_filter( 'rank_math/registration/do_url_check', '__return_false' );
Here’s how you can add the filter: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Once done, please clear your website’s cache, and reconnect your Rank Math account one more time.
Let us know how this goes. Please let us know if you have further questions or concerns.
Thank you.
Clearing the Cloudflare cache resolved the sitemap_index.xml blank page issue. I use a reverse proxy to serve content on tryme.co/how-to-hire from blog.tryme.co. Everything seems to work, except sitemap_index.xml.
Since RankMath doesn’t generate the actual sitemap_index.xml in the local web directory, browsing tryme.co/how-to-try/sitemap_index.xml returns a 404 page not found error because the xml file doesn’t exist.
My questions are:
1) Is it possible to create sitemap_index.xml in the local web directory?
2) If option #1 doesn’t work, does RankMath allow fetching the content from blog.tryme.co/sitemap_index.xml in order to pass it on to tryme.co/how-to-try/sitemap_index.xml?
I appreciate it if you can point me in the right direction.
Thank you,
Dat
Hello,
1. Rank Math doesn’t create the XML file in your website’s root directory as we generate it veritually. You just need to make sure that your sitemap is not heavily cached as instructed in the previous reply here.
2. The sitemap should still work as long as you have the correct URL configured in your WP dashboard.
The current issue is that the URL doesn’t match as you can see from the screenshot below:
Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.
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.