A sitemap is a list of the pages you want search engines to find — a roadmap that helps Google discover and index your content faster, especially on newer or larger sites where pages might otherwise be missed.
This guide explains what an XML sitemap is, how to create one, what to include (and leave out), and how to submit it to Google so your pages actually get crawled.
What you need
- ✓Your website's URL and a list of the pages worth indexing.
- ✓A sitemap generator, or a platform that outputs one automatically.
- ✓A Google Search Console account (free) to submit it.
Step-by-step
- 1
Decide which pages belong in it
Include canonical, indexable pages you want in search: your key content, tools, articles and category pages. Leave out duplicates, thank-you pages, admin URLs and anything set to noindex.
- 2
Generate the XML sitemap
Use a sitemap generator or your platform's built-in one. It produces an XML file listing each URL, optionally with a last-modified date and priority.
- 3
Host it at a stable URL
Place it at a predictable location like yoursite.com/sitemap.xml. Keep the URL stable so search engines and your robots.txt can always find it.
- 4
Reference it in robots.txt
Add a 'Sitemap: https://yoursite.com/sitemap.xml' line to your robots.txt. This tells any crawler where to find it, even before you submit it.
- 5
Submit it in Google Search Console
In Search Console, go to Sitemaps, enter the sitemap URL and submit. Google will fetch it and report how many URLs it discovered and indexed.
- 6
Keep it current
Update the sitemap when you add or remove pages. Most platforms regenerate it automatically; if yours doesn't, refresh it after major changes.
Examples
- A blog with 40 posts lists each post URL plus the home, blog and category pages, and excludes tag pages that duplicate content.
- A large site splits its sitemap into a sitemap index pointing to several sub-sitemaps once it passes 50,000 URLs (the per-file limit).
Tips
- →Only include indexable, canonical URLs — a sitemap full of redirects or noindex pages wastes crawl budget and confuses Google.
- →Add the Sitemap line to robots.txt so crawlers find it automatically.
- →Keep last-modified dates honest; faking freshness doesn't help and can erode trust.
- →Split into a sitemap index once you exceed 50,000 URLs or 50 MB per file.
- →Submitting a sitemap helps discovery but doesn't guarantee indexing — quality and internal links still matter.
Common mistakes
- Including noindex or redirected URLs. List only canonical, indexable pages; drop duplicates and redirects.
- Forgetting robots.txt. Add a Sitemap: line so any crawler can find it.
- Never updating it. Regenerate after adding/removing pages so it reflects the live site.
- Expecting a sitemap to force indexing. It aids discovery; indexing still depends on content quality and links.
Conclusion
Creating a sitemap is straightforward: list your canonical, indexable pages, host it at a stable URL, reference it in robots.txt, and submit it in Search Console. Keep it current and clean, and you give Google the clearest possible map of what to crawl.