On-page basics

Sitemap

In brief

An XML file listing all the important URLs on your website. It helps Google find and crawl new content faster.

A sitemap is a machine-readable list of the important URLs on your website. It helps Google and other search engines discover new or changed content faster and index it correctly.

The XML sitemap in detail

A standard sitemap is an XML file with a urlset root element containing any number of url children. Each url contains at least the loc entry with the absolute URL. Optional elements are lastmod for the date of the last change, changefreq as a hint about update frequency, and priority from 0.0 to 1.0. Google largely ignores changefreq and priority, but lastmod and loc do matter.

Sitemap index for large sites

A single sitemap may contain at most 50,000 URLs or 50 MB. If your site has more, group topic sitemaps into a sitemap index file. At bytebrise we use this pattern: one sitemap for static pages, one for landing pages, one for blog articles. The sitemap index points to all three.

Which URLs belong in it

Only pages that should be indexed by Google. So no URLs with a noindex meta tag. No 404 pages. No old redirects. No paginated overviews where only the first page should be indexed. Each URL also needs a valid canonical tag that either references itself or points to another indexable page.

Submitting and maintaining it

Add the sitemap URL to your robots.txt as a Sitemap directive. Also submit it explicitly in Google Search Console and Bing Webmaster Tools. Only update lastmod when the content has genuinely changed, not on every cache refresh, otherwise Google learns to ignore the date.

Related terms

robots.txt · Canonical tag · Google Business Profile

Want to improve your website?

We analyse your site and tell you honestly what is worth fixing. The initial consultation is free.

Free initial consultation