Combining different sitemap types
Last updated
Last updated
Sitemap extensions are a powerful way to provide Google with detailed information about the diverse content on your website. Your pages often contain a rich mix of elements – think news articles with embedded images and videos, or content translated for different languages. Sitemap extensions help Google understand and index this content effectively.
This guide dives deep into combining sitemap extensions, empowering you to leverage their full potential.
Each sitemap extension utilizes a specific namespace to define the tags it supports. This namespace is declared within the <urlset>
tag using the xmlns
attribute.
Think of namespaces as unique identifiers that prevent tag conflicts when using multiple extensions.
Here's a breakdown of common namespaces:
Extension | Namespace |
---|---|
To leverage the power of multiple extensions, you need to declare their respective namespaces within your sitemap. Let's illustrate with an example combining News, Video, and xhtml (for hreflang):
Image
http://www.google.com/schemas/sitemap-image/1.1
News
http://www.google.com/schemas/sitemap-news/0.9
Video
http://www.google.com/schemas/sitemap-video/1.1
xhtml (for hreflang)
http://www.w3.org/1999/xhtml