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

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

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):

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
        xmlns:news="http://www.google.com 

Last updated