What Is an XML Sitemap? Format, Examples and Whether You Still Need One
Discover what a sitemap xml is, its format, examples, and whether it's still essential for your website's SEO strategy.
sitemap xml | Updated October 2026 | 12 min read | hyperank Editorial Team
An XML sitemap is a file, usually at yoursite.com/sitemap.xml, that lists the URLs on your website you want search engines to crawl, with optional details such as when each page last changed. It helps Google, Bing and AI crawlers discover pages faster and more completely, especially on large, new or poorly linked sites. This guide, What Is an XML Sitemap? Format, Examples and Whether You Still Need One, shows what a sitemap.xml looks like, what it does for SEO, when you can skip it and what the different sitemap files you'll see actually are.
Limits and rules below come directly from the sitemaps.org protocol and Google's sitemap documentation, checked in October 2026.
A sitemap doesn't make Google index a page. It makes sure Google knows the page exists, which is the step most indexing problems skip.
Direct Answer: What Is an XML Sitemap?
An XML sitemap is a machine-readable list of the pages on a website, written in XML (Extensible Markup Language), that tells search engines which URLs exist and how recently they changed. Google 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."
- What it contains: One entry per URL, each with the page address and, optionally, a last-modified date.
- Where it lives: Usually at the site root, such as /sitemap.xml or /sitemap_index.xml, and listed in robots.txt.
- Who reads it: Search engine crawlers such as Googlebot and Bingbot, and other crawlers that support the sitemaps protocol.
- Who creates it: Most CMS platforms and SEO plugins generate it automatically; otherwise you can use an XML sitemap generator.
Key Takeaway: A sitemap.xml is your site's table of contents for crawlers: a list of URLs you want found. Seeing one makes the idea much clearer.
What Does an XML Sitemap Look Like? An Annotated Example
An XML sitemap is a plain text file with a short header and one <url> block per page. Here is a minimal, valid example with two pages:
<?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>2026-10-15</lastmod>
</url>
<url>
<loc>https://www.example.com/blog/what-is-an-xml-sitemap</loc>
<lastmod>2026-10-19</lastmod>
</url>
</urlset>What each tag means
| Tag | Required? | What it does | Notes |
|---|---|---|---|
| <urlset> | Yes | Wraps the file and references the protocol standard | Includes the sitemaps.org namespace |
| <url> | Yes | Parent tag for each URL entry | One per page |
| <loc> | Yes | The page's full URL | Must start with the protocol (https://); up to 2,048 characters |
| <lastmod> | No | When the page last changed | W3C Datetime format; YYYY-MM-DD is fine |
| <changefreq> | No | How often the page is likely to change | Google ignores it |
| <priority> | No | Relative priority from 0.0 to 1.0 | Google ignores it |
Format rules
- Encoding: The protocol says "the file itself must be UTF-8 encoded."
- Escaping: Characters such as & in URLs must be escaped as entity codes.
- Absolute URLs: Every <loc> is a full URL, not a relative path.
- One host: URLs in a sitemap must come from a single host and protocol, unless you verify cross-site submission.
To inspect any live sitemap, paste its URL into hyperank's free XML sitemap viewer.
Key Takeaway: A valid sitemap needs only urlset, url and loc; an accurate lastmod is the one optional tag worth adding. Simple as it looks, that file does several useful jobs.
What Does an XML Sitemap Help You Accomplish?
An XML sitemap helps search engines find all your important URLs, notice when they change and understand extra details about media and language versions. Google says search engines use sitemaps to crawl sites more efficiently.
- Discovery: Pages that few other pages link to, such as deep product pages or new posts, get found sooner.
- Freshness: An accurate
lastmodtells Google which pages changed, so updates can be recrawled. Google says it uses lastmod "if it's consistently and verifiably accurate." - Media details: Image, video and news sitemaps add information like image locations, video runtime and news publication dates.
- Language versions: Sitemaps can list alternate language pages for international sites.
- Diagnostics: Submitting a sitemap in Search Console lets you compare "submitted" with "indexed" and find pages Google skipped.
| Site situation | How the sitemap helps |
|---|---|
| New site with few backlinks | Gives Google a full list before links point to every page |
| Large ecommerce catalog | Surfaces deep product pages that navigation rarely links |
| News or frequently updated blog | Signals new and changed URLs quickly |
| Site with videos or many images | Adds media details Google can't always infer |
Key Takeaway: Sitemaps speed up discovery and signal changes; they don't force indexing or improve rankings directly. Which raises the question most site owners actually care about: does it help SEO?
Is an XML Sitemap Important for SEO?
An XML sitemap is important for SEO on most sites because it supports the step every ranking depends on: getting pages discovered and crawled. It isn't a ranking factor itself, and a sitemap can't make Google index a low-quality page.
What it does and doesn't do for SEO
| Does | Doesn't |
|---|---|
| Helps Google find new and deep pages | Guarantee that pages get indexed |
| Signals updated pages through lastmod | Raise rankings on its own |
| Gives you indexing data in Search Console | Fix thin or duplicate content |
| Helps other crawlers, including Bing's, find pages | Override robots.txt or noindex rules |
Sitemap best practices for SEO
- List only indexable, canonical URLs: Leave out redirects, 404s, noindexed pages and duplicates, or the sitemap sends mixed signals.
- Keep lastmod honest: Update it only when a page's content meaningfully changes.
- Submit it: Add the sitemap in Google Search Console and Bing Webmaster Tools, and list it in robots.txt with a line like
Sitemap: https://www.example.com/sitemap.xml. - Validate it: Run it through an XML sitemap validator after big site changes.
Common XML sitemap mistakes
- Listing redirected URLs: After a migration, old URLs often stay in the sitemap; list only the final destination.
- Mixing http and https or www versions: Use the exact canonical version of every URL.
- Setting every lastmod to today: Plugins that stamp the current date on every page make the field useless, and Google may stop trusting it.
- Including staging or test URLs: A sitemap generated from a staging environment can leak development hostnames.
- Forgetting to resubmit after a restructure: If the sitemap location changes, update robots.txt and Search Console.
Key Takeaway: For SEO, a sitemap is infrastructure: low effort, quietly useful and only as good as the URLs you put in it. Useful, yes, but not every site strictly needs one.
Are Sitemaps Still Needed?
Sitemaps are still needed for many sites, but not all. Google's own guidance says you might not need one if your site is small, well linked and light on media, and that you probably do need one if it's large, new or rich in video, images or news.
| You probably need a sitemap if... | You might not need one if... |
|---|---|
| Your site is large (Google's guide uses about 500 pages as the line) | Your site is "small", about 500 pages or fewer |
| Your site is new and has few external links | Your internal linking is comprehensive, so all important pages are reachable |
| You publish a lot of video, images or news | You don't have many media files or news pages that need to appear in search |
Why most sites keep one anyway
- It's free: Most platforms create and update sitemaps automatically.
- It helps diagnosis: Search Console's sitemap reporting shows which submitted URLs aren't indexed.
- It helps beyond Google: Bing and other crawlers use sitemaps too, and Bing's index feeds several other search and AI products.
Example: a 12-page local accountant's site with a menu linking every page can rely on links alone. A 3,000-product store, where many products sit three or four clicks deep in filtered category pages, almost certainly can't, and that's exactly the case Google's guidance describes.
Key Takeaway: Small, well-linked sites can survive without a sitemap, but almost every site benefits from having one. If you do keep one, XML isn't the only format on offer.
Does a Sitemap Have to Be XML? (And What sitemap.xml.gz Is)
No. XML is the most common and flexible format, but Google also accepts RSS, mRSS and Atom feeds and plain text files listing one URL per line. A sitemap.xml.gz file is simply an XML sitemap compressed with gzip to save bandwidth.
| Format | Best for | Limitations |
|---|---|---|
| XML sitemap | Most sites; supports lastmod, images, video, news and language versions | Needs correct XML syntax |
| RSS, mRSS or Atom feed | Blogs and sites that already publish a feed | Usually lists only recent URLs |
| Text file | Very simple sites | URLs only; no dates or media details |
| sitemap.xml.gz | Large XML sitemaps | Same limits apply to the uncompressed file |
Size limits to remember
- Per sitemap: The sitemaps.org protocol and Google allow up to 50,000 URLs and 50MB (52,428,800 bytes) uncompressed per file.
- Compression doesn't raise the cap: A gzipped sitemap must still be no more than 50MB once uncompressed.
- Bigger sites: Split URLs across several sitemaps and list them in a sitemap index file, which can itself list up to 50,000 sitemaps.
Key Takeaway: XML is the default for good reason, but feeds and text files are valid, and .gz is just a compressed XML sitemap. Whatever the format, there's also the question of who should be able to see it.
Should a Sitemap Be Public or Noindexed?
A sitemap should be publicly accessible, because crawlers need to fetch it without logging in, and you don't need to hide it. Whether the sitemap file itself appears in search results doesn't matter much; Google reads sitemaps whether or not the file is indexed.
- Keep it public: Don't put the sitemap behind authentication or block it in robots.txt, or crawlers can't read it.
- Should it be noindexed? It's optional. Sitemap files rarely rank for anything, and adding an
X-Robots-Tag: noindexHTTP header to the sitemap keeps the file out of results without stopping search engines from using it. - Don't confuse the file with the pages: Noindexing the sitemap file is harmless; including noindexed pages inside the sitemap is the real mistake.
- Exposure isn't a security risk by itself: A sitemap lists pages you want public anyway. If a URL shouldn't be seen, protect it with authentication, not by leaving it out of the sitemap.
How to find any site's sitemap
- Try the usual addresses: /sitemap.xml, /sitemap_index.xml and, on Shopify stores, /sitemap.xml at the store domain.
- Check robots.txt: Open /robots.txt and look for a line starting with "Sitemap:".
- Check Search Console: For your own site, the Sitemaps report shows every sitemap submitted and when Google last read it.
If you're unsure whether a site even has a sitemap, use hyperank's free sitemap finder.
Key Takeaway: Make the sitemap reachable; noindexing the file is fine, but never list noindexed pages in it. Open a real site's sitemap, though, and you'll often find several files rather than one.
Sitemap Files You Will See: page-sitemap.xml, Post Sitemaps and Sitemap Indexes
Many sites don't have a single sitemap.xml but a set of files, usually generated by a CMS or SEO plugin and tied together by a sitemap index. Each file covers one type of content.
| File | What it usually contains | Commonly generated by |
|---|---|---|
| sitemap_index.xml or sitemap.xml | A list of the other sitemap files | WordPress SEO plugins, Shopify and many CMSs |
| page-sitemap.xml | Static pages, such as About or Contact | WordPress SEO plugins such as Yoast SEO |
| post-sitemap.xml | Blog posts | WordPress SEO plugins |
| product-sitemap.xml or sitemap_products_1.xml | Product pages | WooCommerce plugins, Shopify |
| category-sitemap.xml | Category or tag archive pages | WordPress SEO plugins |
| image or video sitemaps | Media details for images and videos | SEO plugins or custom builds |
How a sitemap index looks
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/page-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://www.example.com/post-sitemap.xml</loc>
</sitemap>
</sitemapindex>Submit the index file in Search Console, and Google will find every child sitemap from it. Search Console then reports each child sitemap separately, which makes it easy to spot, for example, that product pages are indexed far less often than blog posts.
Key Takeaway: Multiple sitemap files are normal; submit the index and let it point to the rest.
Conclusion
An XML sitemap is a simple file that lists your URLs so search engines can find and recrawl them efficiently. It doesn't guarantee indexing or rankings, but it's free, easy to maintain and useful on almost any site, and essential on large, new or media-heavy ones.
- What it is: A UTF-8 XML list of URLs with optional lastmod dates.
- Limits: 50,000 URLs and 50MB uncompressed per file; use a sitemap index beyond that.
- Do you need one: Google says small, well-linked sites might not; most sites still benefit.
- Best practice: List only canonical, indexable URLs and keep lastmod honest.
- Visibility beyond Google: Being crawled and indexed is also the first step to appearing in AI answers. hyperank helps brands see what AI says about them by aggregating daily insights from six major AI engines and capturing the qualitative answers and trends, not just rankings, so you know what AI gets right or wrong. hyperank believes understanding and influencing how AI engines represent your brand is now critical, and it gives brands and agencies transparency and control over that AI-driven reputation.
Next step: open yoursite.com/sitemap.xml, check that every listed URL is one you want indexed, and submit it in Search Console if you haven't.
FAQ
What is an XML sitemap, what format does it use, and do you still need one?
An XML sitemap is a file, usually at /sitemap.xml, that lists the URLs you want search engines to crawl, written in UTF-8 XML with a urlset wrapper and one url and loc entry per page, plus an optional lastmod date. Each file can hold up to 50,000 URLs or 50MB uncompressed. Google says small sites of about 500 pages or fewer with thorough internal linking might not need one, but large, new or media-heavy sites usually do, and most sites benefit from having one.
What does an XML sitemap do?
It tells search engines which URLs exist and when they changed, helping them discover and recrawl pages more efficiently.
How does a sitemap.xml work?
Crawlers fetch the file, read each URL and its lastmod date, and use that list alongside links they find to decide what to crawl.
Is an XML sitemap important for SEO?
Yes, for discovery and crawling, though it isn't a ranking factor and doesn't guarantee indexing.
What is sitemap.xml.gz?
An XML sitemap compressed with gzip. The 50MB limit still applies to the uncompressed file.
Should my sitemap be noindexed?
It's optional. Search engines can still read a sitemap with a noindex header; what matters is not listing noindexed pages inside it.
What is page-sitemap.xml?
A sitemap file, usually generated by a WordPress SEO plugin, that lists a site's static pages; it's typically one of several files linked from a sitemap index.
Methodology: Tag definitions and limits come from the sitemaps.org protocol and Google Search Central's sitemap documentation, checked in October 2026. File names vary by CMS and plugin version; check your own site's sitemap index for the exact files.
See where your brand stands
How six AI engines describe you, next to your competitors. About two minutes.