URLSet and Namespaces

A basic XML sitemap only needs an intro <?xml?> tag, and a <urlset> which has all of the needed namespaces & URLs of the website declared.

Namespace Type Reference URL
Sitemap http://www.sitemaps.org/schemas/sitemap/0.9
Xhtml http://www.w3.org/1999/xhtml
Image http://www.google.com/schemas/sitemap-image/1.1
Video http://www.google.com/schemas/sitemap-video/1.1

Namespaces are declared within the <urlset> tag like so:

<?xml version=“1.0” encoding=“UTF-8”?>

<urlset xmlns=“ http://www.sitemaps.org/schemas/sitemap/0.9” xmlns:xhtml=“http://www.w3.org/1999/xhtml” xmlns:image=“ http://www.google.com/schemas/sitemap-image/1.1” xmlns:video=“ http://www.google.com/schemas/sitemap-video/1.1” >


Only namespaces that are used within the urlset need to be declared.