XML Sitemap
Also known as: Sitemap, Sitemap.xml
An XML sitemap is a machine-readable file listing a site's important URLs, optionally with last-modified dates, to help search engines discover and prioritize pages for crawling. It supplements internal linking rather than replacing it and can be submitted through search engine tools.
Key Takeaways
- An XML sitemap is a machine-readable file listing a site's important URLs for search engines to discover.
- It can include last-modified dates to help engines prioritize recrawling changed pages.
- Sitemaps supplement internal linking rather than replacing it, and can be submitted through search tools.
- A sitemap should contain only canonical, indexable, 200-status URLs.
- Listing noindexed, redirected, or 404 URLs erodes trust in the file and confuses crawlers.
How It Works
An XML sitemap is a file that lists the URLs you want search engines to know about, optionally with a last-modified date for each. Engines read it to discover pages and to spot what has changed since the last crawl. It supplements internal links rather than replacing them, and you can submit it through search engine tools to speed discovery.
Sitemaps matter most on large or poorly linked sites where crawlers might otherwise miss pages. Accurate lastmod values help engines recrawl updated content sooner and use Crawl Budget efficiently, spending fetches on pages that actually changed. This supports healthy Index Coverage by pointing crawlers at the right URLs.
Hygiene is the key discipline. Every listed URL should be canonical, indexable, and return a 200 status. Do not list pages blocked in Robots.txt, redirected, or canonicalized away, and make sure each entry matches its Canonical Tag. A sitemap full of junk URLs confuses prioritization and reduces how much engines trust the file.
Why It Matters
Sitemaps speed discovery of new and updated pages, especially on large or poorly linked sites. Accurate lastmod dates help engines recrawl changed content sooner, keeping the index current for pages that need to rank.
Example
An ecommerce store with thousands of products generates a dynamic XML sitemap that lists only live, canonical, indexable product and category URLs, each with an accurate last-modified date. When a product page is updated, its lastmod changes and the search engine recrawls it sooner. Discontinued products that now return a 404 are automatically dropped from the file, keeping the sitemap clean and trustworthy.
Common Mistake
Listing noindexed, redirected, canonicalized-away, or 404 URLs in the sitemap. A sitemap should contain only canonical, indexable, 200-status URLs; including junk erodes trust in the file and confuses crawl prioritization.
Frequently Asked Questions
What should an XML sitemap include?
Only canonical, indexable URLs that return a 200 status. Exclude noindexed pages, redirects, canonicalized-away duplicates, and 404s. Accurate last-modified dates help engines recrawl changed pages sooner and prioritize crawling efficiently.
Do I still need a sitemap if my site has good internal linking?
It still helps, especially for large sites, new pages, or content not yet well linked. A sitemap supplements internal linking and speeds discovery, but strong internal linking remains important for both crawling and passing authority.
How do I submit a sitemap?
Submit it through search engine webmaster tools such as Google Search Console and Bing Webmaster Tools, and reference it in your robots.txt file. Both approaches point crawlers to the file so they can discover your listed URLs.
How large can an XML sitemap be?
A single sitemap file is limited to fifty thousand URLs and fifty megabytes uncompressed. Larger sites split URLs across multiple sitemaps and list them in a sitemap index file, which engines read to find each one.