Troubleshooting · Troubleshooting
How to Fix a Rank Math Sitemap Not Working
Short answer
A Rank Math sitemap usually fails because the Sitemap module is off, the permalink rules are stale, a cache serves an old copy, or another plugin controls the same sitemap address. Turn the module on, re-save permalinks, clear every cache, and open the sitemap index while logged out. Then resubmit that index in Google Search Console and check its fetch status.
Key takeaways
- Rank Math creates a sitemap index at sitemap_index.xml, and a 404 there means WordPress did not find that index or one of its files.
- Rank Math recommends 200 links per sitemap, while Google allows up to 50,000 URLs or 50 MB in a single sitemap file.
- Re-saving permalinks rebuilds the rewrite rules that send sitemap requests to WordPress.
- Posts set to noindex, excluded by ID, or left out of Sitemap Settings do not appear in the sitemap.
- Submitting a sitemap is only a hint, so Google may still choose not to download or crawl every listed URL.
- A stale sitemap is often a cached copy, so test it in a private window and purge the plugin, server, and CDN caches.
What does a Rank Math sitemap not working mean?
A Rank Math sitemap is not working when its index address returns an error, shows the wrong content, or leaves out pages that should be listed.
A sitemap is a file that lists the pages, videos, and other files on your site, and search engines read it to crawl your site more efficiently. Google Search Central gives that definition in its sitemap overview, and it notes that a sitemap tells search engines which pages you think are important. Learn about sitemaps
Rank Math creates a sitemap index for your site at sitemap_index.xml. That index lists smaller sitemaps for posts, pages, and other content types. How to Configure Sitemaps in Rank Math
| Symptom | What it usually means | First check |
|---|---|---|
| 404 on sitemap_index.xml | WordPress did not find the index | Re-save permalinks |
| Blank page or XML error | Broken output or a cache problem | Open it in a private window |
| New posts missing | Post type off, noindex, or excluded by ID | Check Sitemap Settings |
| Old URLs still listed | A cached copy is being served | Purge plugin, server, and CDN caches |
| Search Console fetch error | Google could not reach the file | Open the URL while logged out |
How do you check whether the sitemap is really broken?
Open the sitemap in a private browser window while logged out, then open two or three child sitemaps from the index.
A logged-out test matters because a logged-in view can hide a login wall or a cached copy. If the index loads logged out, the file works, and the cause is more likely a cache or a missing post type.
- Open
https://yourdomain.com/sitemap_index.xmlin a private window, using your own domain in place of the example. - Confirm that it loads as XML and lists child sitemaps such as a post sitemap and a page sitemap.
- Click two or three child sitemaps and confirm that each one lists real URLs.
- Search one child sitemap for a recent post URL with your browser find tool.
- Note the exact result: 404, blank page, redirect, login page, or old content.
If the index loads but a single child sitemap returns 404, note which one it is. That detail points to one post type or taxonomy, not to the whole sitemap.
If your pages are also missing from search results, read the guide on why your WordPress site is not showing on Google after you finish the sitemap checks.
Why does the Rank Math sitemap return a 404?
A 404 means WordPress did not find the sitemap index or a single sitemap file at that address.
Rank Math states that a 404 in sitemap_index.xml means the sitemap index is not found or a single sitemap does not exist. How to Configure Sitemaps in Rank Math
Its guide also states that Google expects a 200 response for the URLs it fetches, so a 404 is a real failure, not a display quirk.
The most likely causes, in order, are stale permalink rules, a switched-off Sitemap module, and a second SEO plugin that claims the same address.
A leftover static sitemap.xml file in the site root can also win over the dynamic sitemap. A migration, a plugin change, or a server move can break the rewrite rules without changing any Rank Math setting.
A 404 on one child sitemap points to one post type or taxonomy. Check that type first, because a type with no published, indexable posts can leave its sitemap empty.
How do you fix a Rank Math sitemap 404 step by step?
Work through these steps in order, and retest the sitemap index after step 3 before you move on.
- Open Rank Math SEO → Dashboard and confirm that the Sitemap module is turned on. If it is off, turn it on.
- Open Rank Math SEO → Sitemap Settings, open the General tab, and click Save Changes. This rebuilds the sitemap from your current settings.
- Open Settings → Permalinks and click Save Changes without changing any setting. This rebuilds the rewrite rules that route sitemap requests to WordPress.
- Clear every cache: your caching plugin, your server cache, your CDN, and your browser. Then open the sitemap in a private window.
- Deactivate any second SEO plugin or sitemap plugin, then repeat step 3. Only one plugin should control the sitemap address.
- Ask your host to check the site root for a physical
sitemap.xmlfile. A static file can win over the dynamic sitemap, so remove it only after a backup. - In Rank Math SEO → Sitemap Settings → General, change Links Per Sitemap by 1 and save. This forces Rank Math to rebuild the sitemap files.
- Open
sitemap_index.xmland two child sitemaps while logged out. If they load as XML with current URLs, the 404 is fixed.
Rank Math recommends 200 for Links Per Sitemap, after lowering it from an earlier default of 1000. Google allows up to 50,000 URLs in one sitemap, but Rank Math notes that smaller sitemap pages work better. How to Configure Sitemaps in Rank Math
If the 404 survives steps 1 to 8, the rewrite rules are the next suspect. A similar 404 pattern on posts is covered in the guide on how to fix 404 errors on posts and pages, and the same permalink re-save often fixes both.
Why are new posts missing from the Rank Math sitemap?
A post is missing because its post type is off in Sitemap Settings, the post is set to noindex, it is excluded by ID, or it is still a draft.
Open Rank Math SEO → Sitemap Settings and open the tab for that post type, such as Posts or Pages. Confirm that Include in Sitemap is on. How to Configure Sitemaps in Rank Math
Rank Math gives each post type and taxonomy its own switch, so a post can be missing while pages still appear.
Next, open the post itself and check its status and its Rank Math settings. A draft, scheduled post, or password-protected post does not belong in the sitemap. A published post set to No Index in its Robots Meta setting is also left out, because the sitemap should list only URLs you want in search results.
Rank Math also lets you exclude single posts by ID in Sitemap Settings → General → Exclude Posts. Enter the post IDs separated by commas. How to Configure Sitemaps in Rank Math
The same field accepts page IDs and custom post type IDs. Check that field if one post is missing while the rest of its type appears.
Author archives follow a separate rule. The Authors tab appears only when author archives are enabled and set to Index under Rank Math SEO → Titles & Meta → Authors.
Rank Math recommends author archives only for multi-author sites. The setup is covered in the guide on how to set up Rank Math.
Why is the Rank Math sitemap showing old URLs?
A stale sitemap is usually a cached copy, because several cache layers can store the XML file after Rank Math has rebuilt it.
Rank Math advises clearing browser, site, plugin, and server-level caches after a sitemap-related change such as author archive settings. That advice shows how many layers can hold an old copy, and the same layers apply when a new post does not appear. How to Configure Sitemaps in Rank Math
- Open the sitemap in a private window. If it is current there, your normal browser cache was the problem.
- In Rank Math SEO → Sitemap Settings → General, change Links Per Sitemap by 1 and save, then change it back if you want the old value.
- Open Settings → Permalinks and click Save Changes.
- Purge the full cache in your caching plugin, then purge your CDN cache.
- Ask your host whether a server cache stores
.xmlfiles, and ask for the sitemap URLs to be excluded from caching. - Open the sitemap again in a private window and search for the new post URL.
If other changes also fail to appear on the live site, the cause may be wider than the sitemap. The guide on how to fix changes not showing on the live site covers the same cache layers.
Why does Search Console say it could not fetch the sitemap?
Search Console cannot fetch a sitemap when the address returns an error, needs a login, or is blocked for Googlebot.
Open the exact address you submitted in a private window while logged out. If it shows a login page, a maintenance page, a firewall challenge, or a 404, Google sees the same result. Fix that first, because no resubmission will help while the file itself does not load.
Submit only the XML sitemap index, sitemap_index.xml, in Search Console. Do not submit the HTML sitemap, because Google supports XML, RSS, mRSS, Atom 1.0, and text sitemaps, not an HTML page that lists links. Build and submit a sitemap
Check that the Search Console property matches the exact protocol and host of the sitemap, including https and www. A mismatch can produce a fetch error even when the file loads in your browser.
Google also warns that submitting a sitemap is merely a hint. It does not guarantee that Google will download the sitemap or use it for crawling. Build and submit a sitemap
How do you submit the fixed sitemap to Google?
Submit sitemap_index.xml once in Search Console, then add the same address to robots.txt so other crawlers can find it.
- Open Google Search Console and select the property that matches your site address exactly.
- Open Indexing → Sitemaps in the left menu.
- Enter
sitemap_index.xmlin the Add a new sitemap field and click Submit. - Wait for the status to change from pending, then check the fetch status and the number of URLs discovered.
- Add this line to
robots.txt, with your own domain:Sitemap: https://yourdomain.com/sitemap_index.xml.
Google accepts the Search Console report, the Search Console API, and a robots.txt line as ways to make a sitemap available. The Search Console route gives you the fetch status and processing errors. Build and submit a sitemap
Keep the sitemap inside the size limits. Google limits a single sitemap to 50 MB uncompressed or 50,000 URLs, and it ignores the priority and changefreq values. Google does use lastmod when it is consistently and verifiably accurate. Build and submit a sitemap
A sitemap file must be UTF-8 encoded, and its URLs must be fully qualified, absolute URLs. Google crawls the URLs exactly as listed. Sitemaps protocol
If new pages still take time to appear after a successful submission, that is a separate indexing question. The guide on how to get new WordPress pages indexed faster covers the checks that follow a working sitemap.
When should you contact your host about the sitemap?
Contact your host when the sitemap still returns 404 after you re-saved permalinks, cleared caches, and removed other sitemap plugins.
Ask the host to check the server rewrite rules for the sitemap address, the server error log for the failed request, and any firewall rule that blocks .xml requests. Ask for the exact rule they added so you can record it.
Also ask the host to confirm that no static sitemap.xml file sits in the site root and that no server cache stores an old copy. A host can see in its logs which layer returned the error.
Back up the site before the host changes any server file. After any server change, retest the index and two child sitemaps in a private window, then resubmit the index in Search Console.
What mistakes should you avoid?
Avoid these errors, because each one can keep a working sitemap out of Search Console.
- Do not submit the HTML sitemap to Search Console. Google does not accept an HTML page as a sitemap, even if it lists every link.
- Do not edit the generated XML by hand. Change the Rank Math settings instead, because a hand edit is lost the next time Rank Math rebuilds the file.
- Do not set Links Per Sitemap to 50,000. Rank Math recommends 200, and smaller sitemap pages are easier for search engines to read.
- Do not leave Settings → Reading → Discourage search engines from indexing this site checked on a live site. That setting asks search engines to stay away from the whole site.
- Do not submit the sitemap under the wrong property or protocol. Check the exact address in Search Console before you submit.
- Do not judge the sitemap by a logged-in view alone. Always retest it in a private window while logged out.
- Do not keep two SEO plugins active. Only one plugin should control the sitemap, or the two can fight over the same address.
Frequently asked questions
Where is the Rank Math sitemap URL?
Rank Math creates a sitemap index at sitemap_index.xml on your domain. You can also see the address at the top of Rank Math SEO, then Sitemap Settings, then General. Open that address in a private window to confirm that it loads as XML.
Why does my Rank Math sitemap show a 404 error?
A 404 usually means the permalink rewrite rules are stale, the Sitemap module is off, or another plugin claims the same address. Turn the Sitemap module on, save Sitemap Settings, then open Settings, then Permalinks, and click Save Changes. Clear every cache and retest the index while logged out.
Why is a new post not in my Rank Math sitemap?
Check that the post is published, that its post type has Include in Sitemap turned on, and that the post is not set to No Index. Also check the Exclude Posts field in Sitemap Settings, because an ID listed there keeps that post out. Then purge the caches and open the post sitemap again.
How long does it take for Google to read a fixed sitemap?
Search Console usually fetches a resubmitted sitemap within minutes to hours, and the Sitemaps report shows the fetch status and the number of URLs discovered. Crawling and indexing the listed pages can take longer, and submitting a sitemap does not guarantee that Google will index every URL.
Should I submit the HTML sitemap to Google Search Console?
No. Google accepts XML, RSS, mRSS, Atom 1.0, and text sitemaps, but it does not accept an HTML page as a sitemap. Submit only the XML sitemap index, sitemap_index.xml, in Search Console. Use the HTML sitemap only as a page that helps human visitors find content on your site.
Can a caching plugin break a Rank Math sitemap?
Yes. A caching plugin, a server cache, or a CDN can store an old copy of the sitemap and serve it after Rank Math has rebuilt the file. Test the sitemap in a private window, purge the plugin and CDN caches, and ask your host to exclude sitemap URLs from caching if the old copy keeps coming back.
Sources
- How to Configure Sitemaps in Rank Math Rank Math
- Build and Submit a Sitemap Google Search Central
- Learn About Sitemaps Google Search Central
- Sitemaps Protocol Sitemaps.org
- Rank Math SEO WordPress.org
- Sitemap Filters and Hooks Rank Math
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
