An XML sitemap helps search engines discover important URLs on your WordPress website. But when a sitemap returns a 404 error, “Couldn’t fetch” message, outdated URLs, or invalid XML, the problem can come from several places.
Here are 10 practical fixes you can check before repeatedly resubmitting your sitemap in Google Search Console.
1*. Check the Correct Sitemap URL*
WordPress can use its native sitemap:
https://example.com/wp-sitemap.xml
SEO plugins may use another URL, such as:
https://example.com/sitemap_index.xml
First identify which system is generating your sitemap.
- Check WordPress Search Visibility Go to: WordPress → Settings → Reading Make sure you haven't accidentally enabled the option that discourages search engines from indexing your site. After changing the setting, save it and test the sitemap again.
- Flush Permalinks If your sitemap suddenly returns a 404, try: WordPress → Settings → Permalinks → Save Changes You don't need to change the permalink structure. This can refresh WordPress rewrite rules.
- Clear Your Cache Caching can cause WordPress to serve an outdated sitemap. Clear cache from: WordPress caching plugin Hosting/server cache CDN Cloudflare Browser cache Then open the sitemap again in a private browser window. If old URLs are still appearing, caching should be one of the first things you investigate.
- Check What the Sitemap Actually Returns Open the sitemap directly. It should return XML content. If you instead see: 404 403 500 error Homepage Login page Security challenge HTML error page then Google may not be able to process the sitemap correctly. Don't assume the XML itself is the problem. Check the actual response first.
- Look for Invalid XML If the sitemap opens but reports an XML parsing error, inspect the beginning of the document. Unexpected characters or output before the XML declaration can cause problems. Potential causes include: Plugin conflicts Theme code PHP output Custom sitemap modifications Server configuration Fix the source of the unexpected output rather than repeatedly resubmitting the sitemap.
- Check Robots.txt Open: https://example.com/robots.txt Make sure you aren't accidentally blocking important content. Your robots.txt may also contain a sitemap declaration such as: Sitemap: https://example.com/sitemap_index.xml Don't copy another site's robots.txt without understanding the rules.
- Check HTTPS and Redirects After moving from HTTP to HTTPS, check whether your sitemap redirects correctly. Verify: WordPress → Settings → General Check both: WordPress Address Site Address Make sure they use the correct HTTPS version. Also check whether your CDN or Cloudflare configuration is creating unexpected redirect loops or responses.
- Check SEO Plugin Conflicts Avoid having multiple plugins trying to control the same sitemap. For example, you might have: WordPress native sitemap Rank Math Yoast Another sitemap plugin Custom sitemap code Find out which system is actually generating your sitemap. If you recently changed SEO plugins, test the sitemap carefully.
- Check Google Search Console Once the sitemap works correctly in your browser, go to: Google Search Console → Indexing → Sitemaps Submit the sitemap URL. Then check: Status Last read Discovered URLs Errors Remember the difference between: Google can't fetch my sitemap and Google fetched my sitemap but some URLs aren't indexed. These are different problems. A working sitemap helps Google discover URLs, but it doesn't guarantee that every URL will be indexed or rank. My Practical Experience While working on my own website, I found that sitemap problems can be confusing because Search Console isn't always the root cause. I had to check the actual sitemap URL, caching, redirects, WordPress settings, and the SEO plugin generating the sitemap. My preferred troubleshooting order is: Open sitemap → identify generator → check response → clear cache → check robots.txt → check HTTPS → check plugins → test again in Search Console. This is much more useful than repeatedly clicking Submit in Search Console. Final Checklist Before resubmitting a problematic sitemap, check: Correct sitemap URL Correct sitemap generator WordPress visibility settings Permalinks XML response HTTP status Cache robots.txt HTTPS Redirects Plugin conflicts Google Search Console status Fix the sitemap first, then investigate indexing. A sitemap is a discovery tool—not a guarantee of indexing or rankings.
Top comments (0)