What Should Be The Value Of Xmlns Attribute For Urlset Tag In The Sitemap?
My sitemap looks something like this:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/page1.html</loc> </url> </urlset>
In the most examples in the internet
urlset tag has a
xmlns attribute with this value
http://www.sitemaps.org/schemas/sitemap/0.9. My question is, what that value comes from?
What exactly should it be?
- The path of where my website sitemap file is located?
The Sitemap protocol defines the XML schema which has the namespace
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.
- → CORS missmatch because of http
- → French Characters from MySQL database to PHP with XML eport fail
- → How do I get JUnit XML output from Jest?
- → Wordpress Sitemap XML Error while using with Custom Permalinks
- → XMLHttpRequest cannot load file:///C:/
- → How to add rich snippet in a website?
- → Your Sitemap does not contain any URLs. Please validate and resubmit your Sitemap?
- → Multi level html drop-down from XML
- → I have sitemap.xml but many SEO audit websites say I don't have...what is the fix?
- → Shopify Updating Inventory 400 Bad Request
- → Update order with basket xml
- → Is it valid to add categories to sitemap.xml?
- → Sitemap Generator detect Only Home Page and also screaming frog detects only homepage