← Back to glossary
Sitemap Glossary

What is <urlset>?

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

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`).

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>

Work with sitemaps programmatically

SitemapKit's API lets you discover, extract, and parse XML sitemaps from any domain. Get structured JSON data with all sitemap elements including urlset.

Related Terms