← Back to glossary
Sitemap Glossary

What is Sitemap XML Namespace?

The xmlns declaration required in sitemap XML files to define the document schema.

The XML namespace declaration is a required attribute on the root element of a sitemap file. For standard sitemaps, it's: `xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"`.

Additional namespaces are used for sitemap extensions: - **Image:** `xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"` - **Video:** `xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"` - **News:** `xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"` - **Hreflang:** `xmlns:xhtml="http://www.w3.org/1999/xhtml"`

Without the correct namespace, search engines may not be able to parse the sitemap correctly.

Example

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
  <!-- URLs go here -->
</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 Sitemap XML Namespace.

Related Terms