What an XML sitemap contains
Each URL gets its own entry, usually with the date it last changed:
<url>
<loc>https://www.example.com/services/seo/</loc>
<lastmod>2026-09-01</lastmod>
</url>
One sitemap can hold up to 50,000 URLs or 50 MB. Larger sites use a sitemap index file that points to several sitemaps. Google ignores the old priority and changefreq fields, but it does use an accurate lastmod date.
Best practice
- Only list pages you want in search: canonical URLs that return a 200 status code, not redirects, errors or noindexed pages.
- Let your CMS or SEO plugin keep the sitemap up to date automatically.
- Submit it in Google Search Console and Bing Webmaster Tools, and add its address to robots.txt.
A sitemap doesn’t guarantee indexing, but it makes sure search engines know which pages you consider important.
Types of sitemaps
- Page sitemaps for ordinary pages.
- Image and video sitemaps, which help Google find media it may miss.
- News sitemaps for news publishers.
- Sitemap index files, which list several sitemaps for large sites.
Sitemap or HTML sitemap?
An XML sitemap is for search engines. An HTML sitemap is a normal page for visitors that lists main sections. They serve different purposes, and a site can have both.
How to create and submit a sitemap
- Use your CMS or an SEO plugin to generate it. On WordPress, plugins such as Rank Math or Yoast do this.
- Open it in a browser (often /sitemap.xml or /sitemap_index.xml) and check that it lists the right pages.
- Submit it in Google Search Console and Bing Webmaster Tools.
- Add the line
Sitemap: https://www.example.com/sitemap.xmlto robots.txt.
Common sitemap mistakes
- Listing redirected, error, noindexed or blocked pages.
- Listing non-canonical or duplicate URLs.
- Letting
lastmoddates change on every build, so they lose meaning. - Forgetting to remove the sitemap of an old site after a migration.
XML sitemap FAQs
Does a sitemap improve rankings?
No. It helps discovery, and Google decides what to index and how to rank it.
How often should I update the sitemap?
Automatically, when pages are added or changed. Submit it once, and Google will re-fetch it.
Why are pages in my sitemap not indexed?
Check the Pages report in Search Console. Reasons include low quality, duplication, noindex tags and crawl errors.