-
We submited the sitemap created from Rank Mat and we are getting the Google “HTML error”…
We check all “Index” option and are all set on and we also tried to upload the sitemap link with a differnt name (by adding a number as for what Rank Math robot advise) but again, Google show a message saying “Couldn’t Fetch”… We tested the Rank Math sitemap in “https://www.xml-sitemaps.com/validate-xml-sitemap.html and says “Problem Detected”… Please help with a resolution. Thanx
-
Hello,
I’m sorry to hear about the issue you are facing with the Google sitemap error. It seems like you have already taken some steps to troubleshoot the problem by ensuring all your posts and pages are set to "Index" and trying to upload the sitemap with a different name as advised by Rank Math.
Since you are still encountering the "Couldn’t Fetch" error in Google Search Console, I recommend following these additional steps to resolve the issue:
-
Validate Your Sitemap: Use the Validate XML Sitemap tool to confirm that your sitemap is correctly configured. Ensure there are no issues detected.
-
Ensure Sitemap Location: If you manually created the sitemap, make sure it is located in the root folder of your WordPress installation with the correct URL format.
-
Flush the Sitemap Cache: Navigate to Rank Math SEO → Sitemap Settings and increase the value of Links Per Sitemap by one. Save your settings and then go to Settings → Permalinks and click Save Changes to apply the current settings.
If after following these steps the issue persists, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for reaching out, and we appreciate your patience as we work to resolve this issue for you.
Best regards.
Sources:
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank MathCan you please be more specifi in this instructions?
1) In the Sitemap Settings, where and what we need to increase the value of Links Per Sitemap by one?
2) Save your settings and then go to Settings → Permalinks… Which setting, the wordpress setting? and before we click “Save Changes”, we should look for something? Or we just save changes?These are the options that we already tried and did not fixed the error:
xxxxxx/sitemap1_index.xml
xxxxxx/sitemap=1_index.xmlHello,
Thank you for contacting us and sorry for any inconvenience that this issue might have caused.
Please follow the steps below for initial troubleshooting:
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/
If the issue persists 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/.
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.
Hello,
You can increase the Links per sitemap option by 1 or any value.
Then, you don’t need to check or change anything in your WordPress permalinks, and hit the save changes button.
Here’s a video screencast you can follow:
https://i.rankmath.com/pipRDpAlso, please 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.
We really appreciate receiving quick replies… We are building this new site by ourself and we are not developers. Unfortunately after a few bad expiriences, we decided to do by ourself 😉
– The step 1, we already did a few times, then refresh the Google console page with the hope it was working but is not. It still give the HTML error.
– The step 2, to edit/add the code on the htaccess, it looks like a simple code but there is a big warning and we decided to skip that option right away. If you believe the warning is just a policy protection, well, we will go head and ad the code.
We ran the site healt-diagnostic and is all good
We check for broken links and we fixed/trash 2 pages in the “draft” and a broken image.
So we refresh the Google console page but unfortunately the error HTML still there.It came in mind: We work with the child theme active… It may be the reason?
Also, the code provided by Ike, should be added in the functions.php in the main theme or it can be added in the functions.php child theme?Thanx again for all help
The problem was fixed…
We flash the dynamic cache on the hosting, and voila’… We refresh the Google Console page and no more errors. Thank you for the supportHello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind us asking, could you please leave us a review (if you haven’t already) on
https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-postabout your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.
-
The ticket ‘Google sitemap HTML error’ is closed to new replies.