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.
- robots.txt. Visit
https://example.com/robots.txt. Most sites list their sitemap on a line likeSitemap: https://example.com/sitemap.xml. - 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)
- 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 withoutwww, 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&or the XML breaks. lastmoddates are honest. Use real last-changed dates in W3C format (for example2026-10-21). Alastmodthat 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.comlistinghttps://www.example.compages, orhttp://URLs on anhttps://site. Make the sitemap match your canonical host. - Invalid dates:
lastmodvalues 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
200directly, not a redirect, 404 or 5xx error. - Check robots.txt. Make sure no
Disallowrule 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
- Listing URLs that redirect, 404 or are noindexed. Only list canonical pages you want indexed.
- 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.
- Forgetting to regenerate the sitemap. New pages that never make it into the sitemap are slower to be discovered.
- Mixing hosts or protocols between the sitemap and the site.
- Faking freshness by bumping every
lastmodon each deploy.
Related tools
- Sitemap Validator: validates XML, counts URLs, checks
lastmod. - Google Indexing Checker: checks robots.txt,
Sitemap:lines and alignment. - Meta Tags Checker: checks a page's title, description and canonical once it's crawled.