An XML sitemap is a list of the pages on your site that you want search engines to find. It doesn’t guarantee those pages will be crawled or indexed, but it helps, especially for new or large sites. This guide explains what to put in a sitemap, the limits, and how to submit one. Make one with the XML sitemap generator.
Quick answer: A sitemap is an XML file, usually at /sitemap.xml, listing the canonical URLs you want indexed. Each file can hold up to 50,000 URLs or 50MB uncompressed; bigger sites use a sitemap index. Use full absolute URLs and UTF-8. Google uses an accurate <lastmod> date but ignores <priority> and <changefreq>. Submit it in Search Console and add a Sitemap: line to robots.txt.
Do you need a sitemap?
Search engines can find most pages by following links, so a small, well-linked site can do without one. A sitemap helps most when:
- your site is new and has few links pointing to it
- your site is large, with pages that are hard to reach through navigation
- you add or update pages often and want them found quickly
- you have pages that aren’t linked well internally
Most website platforms, including WordPress with an SEO plugin, create one automatically. Check yours at yourdomain.com/sitemap.xml or /sitemap_index.xml.
What a sitemap looks like
<?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-11-10</lastmod>
</url>
<url>
<loc>https://www.example.com/guides/delivery/</loc>
<lastmod>2026-10-02</lastmod>
</url>
</urlset>
The rules Google follows
| Rule | What it means |
|---|---|
| 50,000 URLs or 50MB per file | Uncompressed. Split bigger sitemaps into several files |
| Absolute URLs | Use https://www.example.com/page/, not /page/ |
| UTF-8 encoding | And escape characters like & in URLs |
| <lastmod> only if accurate | Google uses it only when it consistently reflects real changes to the content |
| <priority> and <changefreq> | Google ignores both, so you can leave them out |
| Other formats | RSS or Atom feeds and plain text lists of URLs also work |
What to include, and what to leave out
| Include | Leave out |
|---|---|
| Pages you want to appear in search | Pages with a noindex tag |
| The canonical version of each page | Duplicates, such as URLs with tracking or sort parameters |
| Important images or videos, if you use those extensions | Redirected URLs and pages returning errors |
| New and recently updated pages | Login, basket, checkout and thank-you pages |
A sitemap full of redirects, errors or non-canonical URLs sends mixed signals. Keep it to clean URLs that return a 200 status. Check them with the HTTP status code checker and the canonical tag checker.
Sitemap index files
If you have more than one sitemap, for example separate ones for pages, posts and products, list them in a sitemap index file and submit just that one:
<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>
How to submit a sitemap
- Search Console: open the Sitemaps report, enter the sitemap URL and submit. The report shows when Google last read it and any errors.
- robots.txt: add a line such as
Sitemap: https://www.example.com/sitemap.xml. Other search engines read this too. See robots.txt explained.
Submitting a sitemap is a hint, not a guarantee. If pages in it aren’t being indexed, the cause is usually quality, duplication or weak internal links, not the sitemap.
Check a sitemap for errors with the sitemap validator. More tools are in the SEO tools guide.
Based on Google’s sitemap documentation. Other search engines follow the same sitemaps.org protocol but may treat optional tags differently.
Frequently asked questions
What is an XML sitemap?
A file that lists the URLs on your site you want search engines to find, usually at yourdomain.com/sitemap.xml.
How many URLs can a sitemap have?
Up to 50,000 URLs or 50MB uncompressed per file. Larger sites split them and list them in a sitemap index.
Does Google use priority and changefreq?
No. Google ignores both. It uses lastmod only if the dates are consistently accurate.
Do I need a sitemap for a small website?
Not always. A small site with good internal links can be found without one, but a sitemap does no harm and helps new sites.
How do I submit a sitemap to Google?
In the Sitemaps report in Google Search Console, and by adding a Sitemap line to your robots.txt file.
Will a sitemap get my pages indexed?
Not on its own. It helps Google find pages, but whether they’re indexed depends on their quality and other signals.
Sources
Last updated: