Combining different sitemap types
How to Combine Sitemap Extensions
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.
Understanding Namespaces
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 |
---|---|
Image |
|
News |
|
Video |
|
xhtml (for hreflang) |
|
Declaring Multiple Namespaces
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):
Last updated