What Should Be The Value Of Xmlns Attribute For Urlset Tag In The Sitemap?

- 1 answer

My sitemap looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns=""> 

In the most examples in the internet urlset tag has a xmlns attribute with this value My question is, what that value comes from?

What exactly should it be?

  1. The path of where my website sitemap file is located?
  2. Literally ?


The Sitemap protocol defines the XML schema which has the namespace

By using

<urlset xmlns="">

you convey that the urlset element (and its descendants, unless they have a different namespace) should be interpreted according to this Sitemap protocol.

Namespaces help to avoid name collisions. There is no central authority that controls which element names can be used in XML, so any other XML schema may specify an element named urlset, too. Namespaces also allow you to mix elements from different XML schemas, e.g., for extending the Sitemaps protocol.

tl;dr: You have to provide (exactly!) this namespace value, otherwise it wouldn’t be a sitemap as defined by the Sitemap Protocol.