Setting up your sitemap correctly
Published · Last updated
A sitemap is an XML file listing the pages you want search engines to find. One file can hold up to 50,000 URLs or 50 MB uncompressed, and it only helps if every URL in it is live, canonical and readable by a crawler.
Why it matters
The sitemap is the one list you hand to every search engine. A sloppy one teaches them to distrust the rest of your signals.
What a good sitemap has
- Only pages you want indexed, on your real domain, with the exact URL form you use everywhere else.
- Every URL returns a normal page, not an error, redirect or blank shell.
- An accurate last-modified date that changes only when the page really changes.
- A reference to the sitemap in your robots.txt and a submission in Google Search Console.
Common mistakes
- Listing pages that redirect or no longer exist.
- Leaving out new pages, so they depend on links alone to be found.
- Pointing at a staging or preview domain.
- Setting every date to today, which makes the dates meaningless.
What this does not tell you
Whether your sitemap matches what is actually live and linked on your site, and which pages are orphaned. That cross-check is where most sites find their surprises.