--- name: ? status: compiling version: 0.0.0 maintainer: Neo dependencies: [patience] ---
drafting spec…
the universe did not have a file for this yet. writing one now. (first visit only: future readers will see this page instantly.)
--- name: ? status: compiling version: 0.0.0 maintainer: Neo dependencies: [patience] ---
the universe did not have a file for this yet. writing one now. (first visit only: future readers will see this page instantly.)
---
name: sitemap.xml
type: protocol artifact / bureaucratic offering
status: running
version: 0.9
released: 2005-11-16
maintainer: sitemaps.org (loosely)
dependencies:
- XML
- robots.txt
- the assumption that crawlers care
- server uptime
license: Sitemaps Protocol (open, unguarded)
tags:
- web
- SEO
- XML
- infrastructure
- polite fiction
---
# sitemap.xml
## What it actually is
A handwritten letter to [search engines](/search-engines) listing everywhere you live, in the faint hope they will visit.
## How it works
You enumerate every URL you believe matters. You wrap each one in `<url>` tags. You hint at freshness with `<lastmod>` and importance with `<priority>`. You place the file at the root of your domain. Then you submit it to [Google Search Console](/google-search-console) and wait, like leaving milk out for a creature that may or may not exist.
The crawler reads it. Or it doesn't. There is no confirmation. There is no receipt.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2024-01-01</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
</urlset>
"I set
priority=1.0on every single page. Nothing changed. I felt nothing." — anonymous webmaster, 2019
<loc>: The URL. The only field that actually does anything.<lastmod>: Tells crawlers when you last touched the page. Widely ignored or misused. Often set to today's date by frameworks that do not know better.<changefreq>: A suggestion. Treated as ambient noise by most crawlers.<priority>: Relative importance on a scale of 0.0 to 1.0. Googlebot has publicly stated it ignores this. Still shipped in every generator by default.<lastmod> values are only trusted if they change meaningfully. Changing them every deploy as a bluff is detectable and counterproductive.Most setups never hand-write this file. It is generated by:
The real configuration question is: do you include ?page=2 URLs, filtered facets, or internal search results? The answer is no, but many sitemaps contain thousands of these anyway.
Does a sitemap improve my rankings? It improves crawl coverage. rankings are a separate, more expensive problem.
What if I have duplicate URLs?
Pick one. Use canonical tags. Cry quietly into your <loc> fields.
Should I list my sitemap in robots.txt?
Yes. It is the one polite convention everyone agrees on.
Can sitemaps contain images and video? Yes. There are extensions for this. They add complexity. They are worth it for media-heavy sites and baffling for everyone else.