Skip to content

How to Check a Website's Sitemap (and Fix Search Console Sitemap Errors)

By Needle TeamPublished Updated 4 min read

Share
Summarize with AI
On this page

Quick answer: open yourdomain.com/robots.txt and look for a Sitemap: line. That's the sitemap the site declares. If there isn't one, try /sitemap.xml. To check that it's valid, open it in a browser (it should show XML, not an error page), then run it through a sitemap validator or submit it in Google Search Console and read the status.

Step 1: Find the sitemap

Try these in order. They work for any site, yours or a competitor's.

  1. robots.txt. Visit https://example.com/robots.txt. Most sites list their sitemap on a line like Sitemap: https://example.com/sitemap.xml.
  2. Common locations. If robots.txt doesn't mention one, try:
    • /sitemap.xml (the default for most frameworks, Shopify and many site builders)
    • /sitemap_index.xml (used by the Yoast SEO plugin on WordPress)
    • /sitemap-index.xml
    • /wp-sitemap.xml (WordPress's built-in sitemap)
  3. Search Console. If you own the site, open Indexing > Sitemaps in Google Search Console to see every sitemap that has been submitted and when Google last read it.

If none of these work, the site may not have a sitemap at all. That's common on small sites, and Google can still find pages through links, but a sitemap makes new pages much easier to discover.

Step 2: Check that it's valid

Open the sitemap URL in a browser and check:

  • It returns XML. You should see <urlset> (a list of pages) or <sitemapindex> (a list of other sitemaps). An HTML page, login screen or 404 means crawlers aren't getting a sitemap either.
  • The URLs are your real, final URLs. They should use the same protocol and host as your site (https://, with or without www, consistently), and they shouldn't redirect or return errors.
  • The size is within limits. A single sitemap can hold up to 50,000 URLs or 50 MB uncompressed. Bigger sites need a sitemap index.
  • Special characters are escaped. An & in a URL must be written as &amp; or the XML breaks.
  • lastmod dates are honest. Use real last-changed dates in W3C format (for example 2026-10-21). A lastmod that updates on every build teaches Google to ignore it.

The fastest way to check all of this is the free Sitemap Validator. Enter a domain and it fetches /sitemap.xml, checks that the XML parses, tells you whether it's a URL list or a sitemap index, counts the URLs, and reports lastmod, content type and encoding.

To check that robots.txt points to the sitemap and isn't blocking anything important, run the Google Indexing Checker too.

Step 3: Read the Search Console status

Submit the sitemap under Indexing > Sitemaps in Search Console. After Google reads it, the report shows one of three statuses.

Status What it means What to do
Success Google fetched and parsed the sitemap with no errors Nothing. Check the discovered-pages count looks right
Has errors The sitemap could be read, but some entries have problems. Google still uses the entries it could parse Open the sitemap in the report, read the listed errors, fix them at the source
Couldn't fetch Google couldn't download the file Check the URL, the HTTP response and robots.txt, then resubmit

Fixing "Has errors" (sitemap can be read, but has errors)

Click the sitemap in the report to see the specific errors. The usual causes:

  • Invalid URLs: relative paths, spaces, or unescaped characters. Every <loc> must be a full, absolute URL.
  • URLs on a different host: a sitemap at https://example.com listing https://www.example.com pages, or http:// URLs on an https:// site. Make the sitemap match your canonical host.
  • Invalid dates: lastmod values that aren't in W3C date format.
  • Missing or misspelled tags: for example a <url> with no <loc>, or the wrong namespace on <urlset>.
  • Too large: more than 50,000 URLs or 50 MB uncompressed in one file.

After fixing, resubmit the sitemap. The report updates the next time Google reads it.

Fixing "Couldn't fetch"

  • Open the exact submitted URL in a private browser window. Typos and wrong paths are the most common cause.
  • Check the response. It should return 200 directly, not a redirect, 404 or 5xx error.
  • Check robots.txt. Make sure no Disallow rule matches the sitemap's path.
  • Check firewalls and bot protection. Some security settings block Googlebot or serve it a challenge page.
  • Give it time. A newly submitted sitemap can show "Couldn't fetch" briefly before Google's first attempt. If it persists after a few days and the URL works for you, use the URL Inspection tool on the sitemap URL to see what Google gets.

Common sitemap mistakes

  1. Listing URLs that redirect, 404 or are noindexed. Only list canonical pages you want indexed.
  2. Listing URLs that robots.txt blocks. You're asking Google to index pages it isn't allowed to crawl. See robots.txt and sitemap conflicts.
  3. Forgetting to regenerate the sitemap. New pages that never make it into the sitemap are slower to be discovered.
  4. Mixing hosts or protocols between the sitemap and the site.
  5. Faking freshness by bumping every lastmod on each deploy.

Frequently asked questions

How do I find a website's sitemap?

Open example.com/robots.txt and look for a line starting with "Sitemap:". If there isn't one, try /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml and /wp-sitemap.xml. If you own the site, the Sitemaps report in Google Search Console lists every sitemap you have submitted.

What does "sitemap can be read, but has errors" mean?

Google fetched and parsed your sitemap but found problems in part of it, such as invalid URLs, bad dates or URLs on another host. Google still uses the entries it could read. Open the sitemap in Search Console to see the list of errors and fix them at the source.

Why does Search Console say "Couldn't fetch" for my sitemap?

Google could not download the file. Common causes are a wrong URL, a 404 or 5xx response, a redirect, a robots.txt rule that blocks the sitemap path, or a firewall that blocks Googlebot. Open the URL in a private browser window, fix the response, and resubmit.

How many URLs can a sitemap contain?

Up to 50,000 URLs or 50 MB uncompressed per file. Larger sites split their URLs across several sitemaps and list them in a sitemap index.

More articles, guides, tools, and comparisons for this topic.

Free tool

Free LLM SEO Checker - GEO & llms.txt Audit Tool

Free LLM SEO checker: audit how ChatGPT, Perplexity, and Google AI Overview read your site. Check llms.txt, AI crawler access, JSON-LD schema, and server HTML readiness in 30 seconds. No sign-up.