Part of our website setup guide series

website-setup

Fix: Sitemap Errors in Google Search Console (2026)

Praveen5 min read
Minimal flat illustration of an XML sitemap structure node diagram
On This Page (8 sections)
Privacy Benchmark & Migration Hub

Want to stop Google from tracking your phone and browser? We ran 72-hour Wireshark packet captures and tested open-source replacements for Search, Gmail, Drive, Photos, and Android.

read our complete DeGoogle Starter Pack and benchmark data

Direct Answer (Fix Sitemap Errors): If Google Search Console displays “Couldn’t fetch” or “Has errors” for your sitemap: (1) verify the live URL returns HTTP 200 OK with Content-Type: application/xml, (2) verify your robots.txt does not block /sitemap-index.xml, (3) ensure all listed URLs are self-canonical, 200 OK status, and free of noindex tags, and (4) delete and re-enter the sitemap URL in GSC to clear cached fetch failures.

Google Search Console’s Sitemaps report can show “Couldn’t fetch”, “Sitemap is HTML”, or “Has errors”. These statuses usually point to a wrong URL, an HTTP or CDN response, invalid XML, or URLs that should not be listed. This guide gives you a verification path to follow before you resubmit the file. Before tweaking code, verify whether Googlebot can reach your sitemap file using curl:

# Test HTTP response header as Googlebot user-agent
curl -I -A "Googlebot" https://www.praveentechworld.com/sitemap.xml

Expected Result:

  • A successful 2xx response with XML: The URL is reachable and returning a response that can be inspected. If GSC still shows “Couldn’t fetch”, compare the submitted URL with the tested URL and review the Sitemaps report for its latest fetch status.
  • HTTP 403 Forbidden / 429 Too Many Requests: Cloudflare, AWS WAF, or your server firewall is blocking Googlebot’s IP range.
  • HTTP 404 Not Found: Your sitemap file path is wrong or missing from your /public build directory.

📋 Sitemap Error Diagnostic Matrix

GSC Error StatusPrimary Root CauseNext Check
Couldn’t fetchWrong path, unsuccessful response, or firewall blockVerify the exact generated URL and response via cURL
Sitemap is HTML404 page returning HTML instead of raw XMLFix the submitted path and return raw XML
Has errors (XML Syntax)Unescaped special characters (&, <) or bad tagsValidate XML via xmllint command
URLs not indexedLow content depth or noindex tags on listed pagesRemove noindex pages from XML
Blocked by robots.txtDisallow: rule targeting /sitemap.xmlUpdate robots.txt with Allow: directive

Step-by-Step Fixes for GSC Sitemap Errors

Error 1: “Couldn’t Fetch” (Most Common)

This status occurs when Googlebot cannot retrieve or process the submitted sitemap at the time of the check. Start with the exact URL and the response body; do not treat a resubmission as a guaranteed indexing action.

1. Verify URL Path in Browser

Paste your exact generated sitemap URL (https://yourdomain.com/sitemap.xml) into a browser window. If it displays XML, the file is reachable. If it displays your 404 page or an HTML error, your sitemap filename, rewrite, or path is incorrect.

2. Check Cloudflare & WAF Security Logs

If you use Cloudflare or an enterprise firewall:

  1. Log into your Cloudflare Dashboard $\rightarrow$ Security $\rightarrow$ Events.
  2. Filter by User Agent: Googlebot.
  3. If Cloudflare’s Bot Management is blocking requests, create a WAF bypass rule allowing User-Agent Googlebot.

Error 2: “Sitemap is HTML”

This error occurs when GSC expects raw XML code but receives an HTML webpage (usually your server’s custom 404 error page).

<!-- WRONG: Returning HTML instead of XML -->
<!DOCTYPE html>
<html>
  <head><title>404 Not Found</title></head>

<!-- CORRECT: Raw XML Header -->
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

Fix: Ensure your build script places the generated sitemap file in the public output directory (/public or /dist) and that the submitted URL returns XML rather than a rendered error page.


Error 3: “Has Errors” (XML Syntax & Unescaped Characters)

XML is extremely strict. A single unescaped ampersand (&) or missing closing tag invalidates the entire sitemap file.

Validate XML via Terminal (xmllint):

# Validate XML syntax locally before publishing
xmllint --noout public/sitemap.xml

Common XML Entity Escapes:

  • Replace & with &amp;
  • Replace < with &lt;
  • Replace > with &gt;
  • Replace ' with &apos;
  • Replace " with &quot;

Error 4: “Sitemap Exceeds 50,000 URLs or 50MB Limit”

Google enforces strict limits: an individual sitemap file cannot exceed 50,000 URLs or 50MB uncompressed.

Fix: Split your sitemap into child files (sitemap-1.xml, sitemap-2.xml) and create a Sitemap Index file:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.praveentechworld.com/sitemap-0.xml</loc>
    <lastmod>2026-08-14</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.praveentechworld.com/sitemap-1.xml</loc>
    <lastmod>2026-08-14</lastmod>
  </sitemap>
</sitemapindex>

Submit the canonical sitemap URL your site actually generates, such as /sitemap.xml or /sitemap-index.xml; do not submit every compatibility alias. For this site, robots.txt points to /sitemap-0.xml, while the other sitemap paths redirect to that generated file.


Error 5: “Sitemap Blocked by robots.txt”

Before Googlebot fetches your sitemap, it reads your robots.txt rules.

Ensure your public/robots.txt file explicitly points to your sitemap:

User-agent: *
Allow: /

# Sitemap Index Declaration
Sitemap: https://www.praveentechworld.com/sitemap-0.xml

Summary & Further Reading

To resolve GSC sitemap errors: run curl -I -A "Googlebot" to verify HTTP 200 response status, validate XML formatting with xmllint, and ensure your robots.txt allows crawler access.

For related technical SEO guides, check out:

Web InfrastructureSponsored Web Platform
Free PowerShell & Sysadmin Toolkit

Get Our Sysadmin & AI Runbooks Direct to Your Inbox

Join 2,500+ engineers receiving our weekly PowerShell automation scripts, root cause analyses, and hardware diagnostic playbooks.

Zero spam. Unsubscribe anytime in 1 click.

Frequently Asked Questions: Fix: Sitemap Errors in Google Search Console (2026)

Why does Google Search Console say 'Couldn't fetch' for my sitemap?
This usually means Google could not retrieve or process the submitted sitemap at the time of the check. Verify that the exact URL returns the expected XML with a successful HTTP response, is accessible to Google, and lists valid canonical URLs. Search Console may take time to report a new result, but a submission does not guarantee immediate crawling or indexing.
How do I check if my sitemap is blocked by Googlebot?
Open Terminal or Command Prompt and run: curl -I -A 'Googlebot' https://yourdomain.com/sitemap.xml. If the server returns HTTP 403 Forbidden or 404 Not Found, verify the generated sitemap path and check whether your web server or CDN is blocking access.
What is the 50,000 URL limit for sitemaps?
Google limits single XML sitemap files to a maximum of 50,000 URLs and 50MB uncompressed size. Sites exceeding this threshold must use a sitemap index file referencing multiple smaller child sitemaps.
Should I include noindex URLs in my XML sitemap?
No. Including URLs with 'noindex' meta tags in your sitemap sends conflicting signals to Google. Sitemaps must only contain 200 OK, indexable, canonical URLs.
How long after resubmitting a fixed sitemap does Google process it?
There is no guaranteed processing time after a sitemap is resubmitted. Verify the file and use the Sitemaps report to monitor the latest status; submitting a sitemap is a hint, not a guarantee that Google will crawl or index every listed URL.

Official Technical References

  1. Google Search Central: Sitemap Guidelines — Google Developers
  2. W3C XML Schema Validator — W3C
Get Independent Tech Benchmarks First

Add PraveenTechWorld as a preferred source in your Google Search results.

Prefer on Google
P
Praveen

IT ops lead in India. I break Windows, Android and self-hosted AI stacks on my workbench, then write down what actually fixed them.

Explore more: Browse all website setup guides or check related articles below.