Technical SEO
What should an XML sitemap include, and how do I submit it?
An XML sitemap should list only the canonical, indexable pages you want in search results, each returning a 200 status, with an accurate lastmod date. Keep each file under 50,000 URLs and 50 MB, reference it in robots.txt, and submit it in Google Search Console and Bing Webmaster Tools.
What to include
- Canonical URLs only, on your preferred host and protocol.
- Pages that return 200 and are not marked noindex.
- Pages you want people to find. Leave out login, cart, search results and thin pages.
What to leave out
- Redirecting URLs, 404s and pages blocked by robots.txt.
- Duplicate versions of the same page.
- Non-HTML files you do not want listed, such as JSON or text files.
Dates and size
Use lastmod only when it reflects a real change to the page. Google ignores dates that are wrong or always “today”. A single file may hold up to 50,000 URLs or 50 MB uncompressed. Use a sitemap index for more.
Tell search engines about it
Sitemap: https://www.example.com/sitemap.xml
Add that line to robots.txt, then submit the sitemap in Google Search Console and Bing Webmaster Tools. Check the coverage reports for pages Google found but chose not to index, and fix the cause.
How SageRank helps
The page basics check in the free SageRank report tests whether a sitemap is available. Run it with sagerank.io/yourdomain.