-
My sitemap works well until I enable the Images in Sitemaps option. It goes white, but the source code is there. I emptied the cache and excluded rank math from the cache plugin, but the problem persists. I’ve also looked if there already is a product-sitemap.xml file but there was none.
-
Hello,
I’m sorry to hear that you are facing issues with your sitemap when adding images. If enabling the Images in Sitemaps option causes the sitemap to go white while the source code is still present, and you have already emptied the cache and excluded Rank Math from the cache plugin, there are a few more steps you can take to resolve this issue:
-
Check for Conflicts: There might be a conflict with another plugin or theme causing this issue. You can use the Health Check plugin to determine which plugin or theme is causing the problem.
-
Add Custom Code: If the above steps do not solve the issue, you may need to add custom code to your functions.php or rank-math.php file from the theme files. You can refer to our guide on how to add a filter/hook to your site for detailed instructions.
If you have already checked for conflicts and added custom code without success, please reply to this ticket, and a human agent from our support team will assist you further.
Thank you for your understanding and patience.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Remove Blank Lines From Sitemaps » Rank Math
Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math
Why Isn’t My URL Included in the Sitemap? » Rank MathThis 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 Rank Math support.
Please enable the Include Images in Sitemap option and share the sitemap URL so we can check and assist you further.
Looking forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Please find the url in the sensitive data field.
Hello,
We’ve checked your sitemaps, and they seem to be opening fine. Please refer to the screenshot in the sensitive data section.
For troubleshooting, you can decrease your links per sitemap in Rank Math > Sitemap Settings > Links per sitemap.
We usually recommend the links per sitemap between 200 and 500 only for faster crawling. Also, Google crawls small-sized sitemaps faster. You can also check Google’s guidelines for sitemaps:
https://developers.google.com/search/docs/advanced/sitemaps/build-sitemapLooking forward to helping you.
Thank you! It’s really weird as it wasn’t working a few hours ago.
Hello,
We are glad to be of help.
Would you need further assistance or we can go ahead to close this ticket?
We are here to assist you.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Please have another look at the sitemap. It’s gone white again, but the xml is still in the source code.
Is this a spam message?
Hello,
Kindly ignore that response, we have taken care of it.
Please follow the steps below to see if it resolves the problem:
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/
Let us know how this goes. Also, let us know if you have further questions or concerns.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
We can also see that the product sitemap now appears. This implies the issue was with the caching of the sitemap.
Since you have excluded the sitemap from caching the issue shouldn’t reoccur. If for any reason it does 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. To do this, you need to add a small piece of code to your site’s functions.php file or use a plugin like Code Snippets.
The code you need to add is this:/** * 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/.
It will show you step-by-step how to use the Code Snippets plugin or edit the functions.php file safely.
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.
Thanks.
-
You must be logged in to reply to this ticket.