How to Find a Website’s Sitemap
A bounded search for public sitemap locations, with response checks and next steps when conventional paths produce no usable file.
Key takeaways
- Check robots.txt before guessing paths.
- A sitemap index can point to many child sitemaps.
- CMS-specific paths are useful clues, not universal rules.
- Automated discovery should validate XML roots instead of trusting filenames.
Open the likely sitemap paths
Enter a website domain. These links open its robots.txt file and the four sitemap locations worth checking first. Nothing is sent to SitemapKit.
Start with robots.txt
Open the site's /robots.txt file and look for one or more Sitemap directives. The value is normally an absolute URL and can point to either a sitemap or a sitemap index. This is the most reliable public hint because site owners can declare non-standard locations there.
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap_index.xmlTry the common public paths
If robots.txt contains no declaration, test a small set of conventional paths. Do not assume a 200 response is valid: some sites return an HTML error page with status 200, so inspect the content type and verify that the document contains a urlset or sitemapindex root.
- /sitemap.xml
- /sitemap_index.xml
- /sitemap-index.xml
- /sitemaps.xml
- /wp-sitemap.xml
Verify that a candidate is really a sitemap
Do not trust the filename or status code alone. A missing sitemap can return a branded HTML page with status 200, while a real sitemap may redirect to a CDN or use application/xml, text/xml, or a gzip content type. Record the final URL and headers, then inspect the downloaded body for a urlset or sitemapindex root.
Keep headers and body separate, then parse the XML rather than searching for a tag with a regular expression. The root check below is only a first pass; namespace, entries, metadata, and limits need further validation. For a .gz download, decompress the file before running xmllint. curl --compressed handles HTTP content encoding, not every gzip file served as a download.
curl --fail --show-error --silent --location --compressed --max-time 20 --dump-header headers.txt --output sitemap.xml https://example.com/sitemap.xml
file sitemap.xml
xmllint --noout sitemap.xml
xmllint --xpath 'local-name(/*)' sitemap.xmlRecognize CMS and framework conventions
WordPress commonly exposes /wp-sitemap.xml or a plugin-generated /sitemap_index.xml. Shopify stores a sitemap at /sitemap.xml. Other platforms may generate files dynamically or expose a custom index. Platform detection narrows the search, but robots.txt and content validation remain the source of truth.
Use first-party tools when you own the site
Search Console's Sitemaps report shows submitted files and processing status. Your CMS, deployment pipeline, or SEO plugin may also expose the generated location. This is preferable to guessing because private staging rules, reverse proxies, and subfolder installations can change the public path.
Automate discovery without creating crawl noise
A responsible finder checks robots.txt, follows declared sitemap URLs, probes a bounded list of common paths, and stops when it has enough evidence. It should deduplicate normalized URLs, follow sitemap indexes recursively with limits, reject non-HTTP targets, and use short timeouts.
SitemapKit discovery uses the supplied URL's origin: https://example.com/shop does not limit it to /shop. It probes robots.txt and a fixed list of 16 common paths, not every possible filename. Robots declarations and index children are candidates; common-path responses must contain a sitemap-root marker. A returned location is not proof that the file meets every protocol rule.
Read a finder result without assuming complete coverage
The discovery coordinator caps its inventory at 200 locations and index traversal at depth 5, within a default 45-second foreground budget. Direct extraction has a separate 50-location ceiling. These are tool limits, not the protocol's 50,000-entry limit. Inspect partial, truncated, and stopReason when present, then check large indexes in smaller groups.
Discovery deduplicates www and apex sitemap identities and repeated path separators. If those hosts serve different inventories, check the exact files independently. A robots declaration can remain in the result even if its fetch later fails. An empty result or partial false is not proof that no sitemap exists or that every candidate loaded.
Finder discovers locations; Checker evaluates a specific file; Extractor collects entries. None tells you whether Google indexed the pages.
Choose the next step from the failed response
Test the preferred HTTPS hostname and any intentionally separate www or subdomain host. Read robots.txt at the origin, not beneath a content folder. Record response statuses and the final redirect destination. A browser's cached login session can conceal a failure that a public crawler encounters.
On a site you control, inspect the deployed CMS settings and confirm that proxy and CDN rules preserve the sitemap route. On a third-party site, stop after bounded public checks. A missing conventional path is not permission to brute-force endpoints or bypass access controls.
- 404 at a guessed path: look for declarations or generator configuration.
- 403 or a login page: ask the owner to expose the intended public file.
- 429 or timeout: wait and retry conservatively; record an inconclusive attempt.
- 200 with HTML: inspect the route and body before calling it a sitemap.
Discover declared and common sitemap locations automatically.
Open the free toolFrequently asked questions
Is a sitemap always located at /sitemap.xml?
No. That path is common, but a site can publish a sitemap anywhere it controls and can declare multiple files in robots.txt.
Can a website have more than one sitemap?
Yes. Large sites often split URLs by content type or locale and connect the files through a sitemap index.
What if every sitemap path returns 404?
The site may not publish a sitemap, may restrict access, or may use an undisclosed location. Internal links can still make the site crawlable.
Primary references
- Google Search Central: robots.txt specifications
- Google Search Central: Manage sitemaps with Search Console
Technical content: SitemapKit Engineering. Maintained by Clément Chaal.
See our technical methodology and editorial policy.