Key takeaways
- A sitemap lists the canonical URLs you want found; it is a hint, not a guarantee of indexing.
- One sitemap file holds up to 50,000 URLs or 50 MB uncompressed; larger sites use a sitemap index.
- Google ignores priority and changefreq, and trusts lastmod only when it is accurate.
- Submit it in Search Console and add a Sitemap: line to robots.txt.
On this page
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://example.com/</loc>
<lastmod>2026-10-28</lastmod>
</url>
<url>
<loc>https://example.com/services/</loc>
</url>
</urlset>
Each page is a <url> entry with its full address in <loc>. The file must be UTF-8, and URLs must be absolute (starting with https://), because Google crawls them exactly as written.
Create one
- Open the sitemap generator.
- Paste your page addresses, one per line. Add a last-modified date if you know it.
- Download
sitemap.xmland upload it to the root of your site, so it opens athttps://yourdomain/sitemap.xml.
Most website builders and content systems (WordPress with an SEO plugin, Shopify, Wix, Squarespace) create a sitemap automatically. Check for one at /sitemap.xml or /sitemap_index.xml before you make your own.
Which URLs belong in it
- Include pages you want in search results: the canonical version of each, returning a 200 status.
- Leave out redirects, pages marked
noindex, duplicates with a different canonical, error pages, search results and thank-you pages. - Pick one version of the domain. If your site redirects
wwwto the bare domain, list only bare-domain URLs.
Limits and tags Google ignores
| Item | What Google does |
|---|---|
| Size | Up to 50,000 URLs or 50 MB (uncompressed) per file. Split larger sites and list the files in a sitemap index. |
<lastmod> | Used when it is consistently accurate. Change it only for significant updates, not for a new copyright year. |
<priority> and <changefreq> | Ignored by Google. You can leave them out. |
Tell search engines about it
- Search Console: open Sitemaps, enter
sitemap.xmland submit. The report shows when Google last read it, how many URLs it discovered and any errors. - robots.txt: add
Sitemap: https://yourdomain/sitemap.xmlon its own line. Bing and other engines read it there too. The robots.txt generator adds the line for you. - Bing Webmaster Tools: you can import your sites from Search Console and the sitemap comes with them.
"Discovered" is not "indexed"
A sitemap helps Google find pages; whether they are indexed depends on their quality and usefulness. For a brand-new site, it is normal to see many pages "Discovered, currently not indexed" in the first weeks. Make sure sitemap URLs are not blocked by robots.txt (check with the robots.txt tester), link to important pages from your menu, and keep adding helpful content.
Sources
- Google Search Central: Build and submit a sitemapdevelopers.google.com
- Google Search Central: What is a sitemapdevelopers.google.com
- Search Console Help: Sitemaps reportsupport.google.com
- sitemaps.org: Sitemap protocolsitemaps.org