Sitemap Glossary

What is <urlset>?

The root XML element in a sitemap file that contains all URL entries.

Written by SitemapKit Editorial TeamUpdated: Jul 21, 2026

Key takeaways

  • Interpret <urlset> in its sitemap XML context; the detailed definition below explains its role and constraints.
  • Validate <urlset> against a real XML example instead of relying on the field or tag name alone.

The `<urlset>` element is the root (enclosing) tag in an XML sitemap file. It must include the Sitemaps.org namespace declaration and wraps all `<url>` entries in the sitemap.

The namespace is required: `xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"`. Without it, search engines may not parse the sitemap correctly. Additional namespaces can be added for extensions like image sitemaps (`xmlns:image`) or video sitemaps (`xmlns:video`).

XML example

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
  </url>
</urlset>

Continue with SitemapKit

Sources and further reading

Work with sitemaps programmatically

SitemapKit's API discovers and parses XML sitemaps into structured JSON, including fields such as urlset.

Related terms