
What Is a Sitemap XML? Definition, Example, and How to Create One
Anyone who has run a website for more than a few months has watched a search engine ignore a page that was sitting right there in the navigation. The fix often lives in a file visitors never see: sitemap.xml, a structured list that tells Google and Bing which URLs exist and how they relate.
Maximum URLs per sitemap: 50,000 · Maximum file size (uncompressed): 50 MB · Supported by search engines: Google, Bing, Yahoo, Yandex · Standard format: XML (Extensible Markup Language)
Quick snapshot
- Sitemaps help search engines discover URLs and crawl a site more efficiently (Google Search Central, Google’s official documentation for site owners).
- The per-file cap is 50,000 URLs or 50 MB uncompressed (Google Search Central, Google’s indexation documentation).
- The major search engines accept XML sitemaps; Bing also allows RSS, Atom, or plain-text lists (Bing Webmaster Tools, Microsoft’s free search-engine console).
- How sitemap submission affects crawl-budget allocation is not publicly documented.
- The ideal update frequency depends on site size and publishing cadence.
- Search engines do not publish how heavily they weight the lastmod attribute.
- The Sitemaps protocol was introduced in 2006 and still defines the file format search engines expect (Wikipedia, community-reviewed reference documentation).
- Large sites should organize multiple files behind a sitemap index (Sitemaps.org, the protocol’s official specification).
- The practical goal: a file browsers never see and crawlers never miss. (Sitemaps.org)
Eight rules, one pattern: the limits are generous, but the format is exact.
| Parameter | Value |
|---|---|
| Protocol introduced | 2006 |
| File extension | .xml |
| Encoding | UTF-8 |
| Max URLs per file | 50,000 |
| Max size per file | 50 MB uncompressed |
| gzip compression | Allowed |
| Tags Google ignores | changefreq and priority (Wikipedia, community-reviewed reference) |
| Common submission routes | robots.txt, Google Search Console |
What is sitemap.xml used for?
An XML sitemap is a discovery file, not a ranking tool. Google Search Central, Google’s official documentation for site owners, defines a sitemap as a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. A search engine that reads it learns which URLs you consider part of the indexable site.
That discovery role matters more than most site owners realize. A crawler entering a domain follows links, so a page with no inbound links depends on direct knowledge of its URL; the sitemap supplies that knowledge. It does not make a page rank higher, it makes a page reachable in the first place.
How does a sitemap look like?
- Root element urlset with the Sitemaps namespace declaration.
- One url block for every page you want considered.
- A loc tag inside each block, holding the page’s full absolute URL.
- Optional lastmod (substantive change date), changefreq, and priority hints.
The protocol’s specification at Sitemaps.org, the open standard’s official home, is exacting: a urlset root element, one loc value for every URL, UTF-8 encoding, fully qualified absolute URLs, entity-escaped special characters, and a single host per file.
<?xml version=”1.0″ encoding=”UTF-8″?> <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″> <url> <loc>https://www.example.com/</loc> <lastmod>2025-01-15</lastmod> </url> </urlset>
Every URL needs a loc value; the other tags are optional. The moment you add a lastmod, you take on a maintenance duty: search engines cross-check that date against the live page, so a date you cannot sustain is worse than omitting it.
What is XML sitemap in SEO?
A sitemap is a crawling-stage tool, not a ranking-stage one. A page that never enters the crawl queue has a 0% chance of ranking; the sitemap simply gets it into the queue.
In SEO terms, XML sitemaps belong to technical crawlability, the layer that decides whether search engines can reach and parse content. The file complements internal links, robots.txt, and canonical tags; it does not replace them. If a URL is blocked by robots.txt or marked noindex, listing it in a sitemap sends a mixed signal rather than a helpful one. Format support is broad: every major search engine reads the XML standard, and XML remains the most useful format because the structure supports extensions for image, video, news, and localized versions of pages.
How do I find my XML sitemap?
The protocol does not dictate where the file must live. In practice, most published sites place it at the root, and the two conventions to try first are /sitemap.xml and /sitemap_index.xml.
How can I get a sitemap for a website?
- Open the domain in a browser with /sitemap.xml added to the address.
- If that returns a 404, check robots.txt. A line starting with Sitemap: reveals the real location, a directive documented by Bing Webmaster Tools, Microsoft’s free search-engine console.
- Log into Google Search Console and open the Sitemaps report; any previously submitted files and their status appear there.
If you own the site, the definitive path is submission. Google Search Central, Google’s official indexing documentation, confirms that a sitemap can be submitted through Google Search Console after you verify site ownership. The same report then surfaces fetch errors and format warnings.
How to tell if a website has a sitemap?
- Guess the conventional paths: /sitemap.xml, then /sitemap_index.xml.
- Read the site’s robots.txt file for a Sitemap: line.
- For sites you do not own, a quick look at the page source or a public sitemap checker can reveal whether one exists.
- For your own site, Google Search Console shows the submitted URL and the last time it was read.
The last leg is discovery. If the file exists but is not referenced in robots.txt and not submitted anywhere, crawlers may never learn about it. A sitemap with no discovery route is effectively invisible.
Do I need a sitemap for my website?
Not every site needs one, and the distinction is sharper than most SEO advice suggests. The decision depends on size, linking structure, and how quickly pages must reach the crawl queue.
Is sitemap.xml still relevant?
The file that costs nothing to generate will cost you trust if it goes stale: a lastmod that stops matching the live page trains crawlers to discount the signal.
Yes, for sites that match at least one profile. Wikipedia’s protocol overview, a community-reviewed reference, lists the cases that gain the most: very large sites, brand-new sites with few external links, sites with weakly linked or isolated pages, and publishers of video and image content.
None of this makes the format obsolete. The opposite is closer to reality: because search engines treat the file as a suggestion rather than a command, it remains the cheapest channel for telling a crawler that new content exists on a deep or isolated page.
Does every website have a sitemap?
- No, and the absence of one is not automatically a problem.
- Small sites with a flat structure and sound internal linking are typically crawled through link discovery alone.
- The protocol exists to fill discovery gaps, not to meet a quota.
A useful threshold: if a crawler can reach every important page through plain links, the sitemap is a convenience. If some pages have no direct links at all, the file moves from convenience to necessity.
Upsides
- Faster, more complete crawling for large or deep sites.
- A structured early signal for brand-new pages, before external links arrive.
- Extensions for video, image, news, and localized content.
Downsides
- No guarantee of crawling, indexing, or ranking benefit.
- Maintenance burden: stale dates and listed noindex URLs erode the file’s value.
- Adds little for small, well-linked sites.
How do I create an XML sitemap?
You can build the file by hand in any text editor, or let a generator and your CMS handle it. The protocol is small enough that understanding the raw XML removes most of the guesswork.
Can you provide an example of an XML sitemap?
- Declare the XML version and UTF-8 encoding.
- Open with the urlset root and the Sitemaps namespace.
- Add one url block per page, and inside it a loc tag with the full URL.
- Add optional tags only when you can maintain them.
<?xml version=”1.0″ encoding=”UTF-8″?> <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″> <url> <loc>https://www.example.com/</loc> <lastmod>2025-01-15</lastmod> </url> <url> <loc>https://www.example.com/guides/sitemap-xml/</loc> <lastmod>2025-01-20</lastmod> </url> </urlset>
The example contains the minimum viable structure: one urlset, two url entries, two loc values. Add genuine lastmod dates only if the pages actually changed on those dates. Changefreq and priority, as the key facts table above shows, carry little weight in practice.
For sites that outgrow a single file, past 50,000 URLs or 50 MB before compression, split the inventory into multiple files and reference them from a sitemap index. The index uses the same XML pattern, replacing urlset with sitemapindex and url with sitemap.
Step-by-step: create and submit a sitemap
- Collect the canonical URLs you want indexed; exclude noindexed, blocked, or redirected pages.
- Build the XML skeleton by hand, or configure a generator plugin to produce it.
- Escape special characters, the protocol requires entity-escaped values in every tag.
- Save the file as sitemap.xml and upload it to the site root, or to any path you control.
- Open the file in a browser and confirm it renders as XML without errors.
- Submit it in Google Search Console, or reference it in robots.txt with a Sitemap: line.
What are the limitations for an XML sitemap?
The format is simple, and its limits are just as simple. Every constraint below is a file-format rule, not an indexing promise.
- 50,000 URLs per file, and 50 MB before compression. Larger inventories must be split across multiple files.
- One host per file: a single sitemap cannot combine URLs from multiple domains.
- The file is a suggestion, not a command. Search engines are not obligated to use any URL in it.
- Compression is allowed because the size cap applies to the uncompressed file, a workaround confirmed in Google Search Central’s protocol documentation.
On the third point, the protocol is unusually candid: its own specification warns that using it does not guarantee crawling. The full note appears in the quotes below. Treat changefreq and priority as legacy hints, Google explicitly ignores them, as captured in the key facts table above.
The lastmod field deserves a special warning. Search engines read it as a signal, and only when it honestly reflects the page’s last substantive change. Bing’s Webmaster Blog, quoted below, frames this as a strict accuracy rule.
Is sitemap free?
- The protocol itself is free and open; the specification at Sitemaps.org carries no licensing.
- Google Search Console and Bing Webmaster Tools accept submissions at no cost.
- Generators range from free plugins to paid platforms; the CMS route is usually bundled.
The real cost is not software, it is maintenance. A sitemap that regenerates whenever a page publishes costs almost nothing to operate. A static sitemap edited by hand drifts, and a drifting file slowly loses the trust of the crawler reading it.
Every sitemap limit is a file-format limit, not an indexing guarantee: the 50,000-URL cap defines what you may submit, never what search engines must use.
What is established
- All major search engines accept XML sitemaps, and Bing also accepts RSS, Atom, and plain-text lists (Bing Webmaster Tools).
- Sitemaps do not guarantee crawling or indexing (Sitemaps.org).
- The per-file standard is 50,000 URLs or 50 MB uncompressed (Google Search Central).
What remains unclear
- How much weight sitemaps carry in crawl-budget allocation is not published.
- The optimal update schedule depends on site size, publishing cadence, and crawler behavior.
- Search engines do not disclose how heavily lastmod influences recrawl decisions.
The protocol’s own specification, Sitemaps.org, is blunt about what the format can promise:
Using the Sitemaps protocol does not guarantee that search engines will crawl your pages.
— Sitemaps.org, protocol specification
Bing’s Webmaster Blog, Microsoft’s search publication, sets a strict accuracy rule for update dates:
The lastmod value should represent the last substantive modification of the linked content, not merely the time the sitemap was generated.
— Bing Webmaster Blog
Bing Webmaster Tools, Microsoft’s free search-engine console, documents the robots.txt shortcut that makes a sitemap discoverable:
Sitemap: https://www.example.com/sitemap.xml
— Bing Webmaster Tools
An XML sitemap is the least glamorous part of technical SEO, and one of the most honest: it tells search engines exactly what you believe should be crawled, and it reveals how well you know your own site. The sites that get value from sitemaps are not the ones with the most elaborate files; they are the ones that keep the file true, regenerate it on publish, and never list a URL they do not actually want indexed. For site owners publishing more than a few pages a week, the choice is clear: automate the sitemap, or watch crawl coverage drift while competitors get found first.
developers.google.com, developers.google.com, developers.google.com
Frequently asked questions
Can I have multiple sitemaps on one website?
Yes. Once a site exceeds 50,000 URLs or 50 MB per file, publishers split the inventory and reference the files from a sitemap index.
How often should I update my sitemap?
Update it when content changes substantively. Bing’s Webmaster Blog ties the update signal to each page’s real modification date, not to the moment the sitemap was generated.
What is a sitemap index file?
A sitemap index is an XML file that lists multiple sitemap files. It is the standard structure for large sites that need more than one sitemap.
Are sitemaps important for eCommerce sites?
Yes. Product catalogs with thousands of pages and faceted navigation are exactly the large, isolated-page profiles where a sitemap helps crawlers find URLs that internal navigation may not surface.
Do sitemaps affect page ranking?
There is no direct ranking mechanism tied to a sitemap. Its job ends at discovery; ranking still depends on content, relevance, and links.
How do I submit a sitemap to Google?
Verify site ownership in Google Search Console, open the Sitemaps report, and enter the sitemap URL. Verification and submission are free.
What is the difference between XML and HTML sitemaps?
An XML sitemap is a machine-readable file designed for search engine crawlers. An HTML sitemap is a visible page that lists links for human visitors. They serve different audiences and can coexist.
Related reading