
What a sitemap is for
An XML sitemap is a file, usually at /sitemap.xml, that lists the addresses on your site you want search engines to know about. Search engines already find pages by following links, so a sitemap does not replace good internal linking. It helps most on new sites, large sites, and sites where some pages are hard to reach by links.
It does not guarantee a page is indexed, and it does not make a page rank. It makes sure the page has been seen.
What belongs in it
List the pages you would be happy to see in search results, and only those:
- The canonical address of each page: https, the version without redirects, the same host as the sitemap.
- Pages that return a normal 200 response.
- Pages that are not set to noindex and not blocked in robots.txt.
Leave out redirects, error pages, internal search results, filtered duplicates, thank-you pages and anything you do not want indexed. A sitemap full of those teaches Google to trust it less.
Limits and tags
One sitemap file can hold up to 50,000 addresses or 50 MB uncompressed. Beyond that, split it into several files and list them in a sitemap index.
Of the optional tags, Google uses lastmod when it is accurate and consistent, and ignores priority and changefreq. Do not set lastmod to today’s date on every build: if it is not true, it is ignored. A date that changes only when the page really changes is worth having.
How to publish and submit it
- Put the file on your own domain, at the root: https://example.com/sitemap.xml.
- Add a line to robots.txt: Sitemap: https://example.com/sitemap.xml. Every crawler reads that file.
- Submit it in Google Search Console under Sitemaps, and in Bing Webmaster Tools. Bing, Yandex and others can also be told about changed pages straight away with IndexNow.
- Check the report a few days later. It shows how many addresses were found and flags any it cannot read.
Mistakes we see most
- The sitemap lists http:// addresses on a site that redirects to https://, or the www version of a site that lives without it.
- It lists pages that redirect, which wastes crawl time and sends mixed signals.
- It lists pages that carry a noindex tag, which contradicts itself.
- It is generated once and never updated, so new pages are missing and deleted ones remain.
- robots.txt blocks the whole site, which nothing in a sitemap can undo.
Build and check yours
Our sitemap tool plans a new site’s pages with a search intent and a draft title for each and exports the XML. Pointed at an existing site, it reads the sitemap (or crawls the site if there is none), checks the first pages the way a search engine would and lists what to fix.
Quick answers
Do I need a sitemap?
Small sites that are well linked often get by without one, but a sitemap costs almost nothing and speeds up discovery. New and large sites benefit most.
How many URLs can a sitemap hold?
Up to 50,000 addresses or 50 MB uncompressed per file. Use a sitemap index to combine several files.
Does Google use priority and changefreq?
No. Google ignores those two tags. It does use lastmod if the dates are accurate.