XML sitemap
<url>
One entry in a sitemap: a required <loc> plus the optional metadata a crawler may or may not use.
Every <url> is a parent container, never a value. Its only required child is <loc>; <lastmod>, <changefreq> and <priority> are all optional, and extension elements for images, news and video go inside it too.
The children have a defined order in the schema, but in practice crawlers are tolerant of it. What they are not tolerant of is a <url> with no <loc>, which is an entry that names nothing.
- Format
- XML sitemap
- Namespace
- Sitemap protocol 0.9
- Parent
- <urlset>
- How many
- One or more per <urlset>, up to 50,000.
What our validator does
Each <url> is checked for a <loc>, and the count of entries missing one is reported as an error.
Broken and fixed
Both documents below are well-formed XML — that is the point of this corpus — and both are run through the validator on every test run. The verdicts here are what it returned, not what we expect it to.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<lastmod>2026-08-10</lastmod>
</url>
</urlset>1 URL entr(ies) are missing a <loc>.<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-08-10</lastmod>
</url>
</urlset>Where it reaches
- FormatsXML sitemapWhere <url> sits in the format as a whole.
- ToolsSitemap validatorCounts entries and reports the ones with no <loc>.
Related elements
- <urlset>The root element of every sitemap. Its namespace declaration is what makes the document a sitemap rather than a list of URLs.
- <loc>The URL itself — the only required child of <url>, and the element where ampersands in query strings go wrong.
- <lastmod>When the page last changed. The one piece of sitemap metadata search engines still act on — and only if you keep it honest.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.