4

After adding multilingual support to a site I've followed Google advice for their XML sitemap to incorporate hreflang links to alternate language versions.

However, after doing this I'm finding various online validators (such as this one) are returning validation errors along these lines:

Element '{http://www.w3.org/1999/xhtml}link': No matching global element declaration available, but demanded by the strict wildcard

A sanitised extract of my sitemap is below. I've preserved the actual formatting (not neatly indented due to how the framework renders it) in case that matters:

<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
    http://www.w3.org/1999/xhtml
    http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"><url>
        <loc>http://dev.domain.com/template/en-GB/</loc>
        <lastmod>2017-02-17</lastmod>


        <xhtml:link rel="alternate" hreflang="en-GB" href="http://dev.domain.com/template/en-gb/" /><xhtml:link rel="alternate" hreflang="de" href="http://dev.domain.com/template/de-de/" /><xhtml:link rel="alternate" hreflang="en-PH" href="http://dev.domain.com/template/en-gb/" /><xhtml:link rel="alternate" hreflang="cs-CZ" href="http://dev.domain.com/cz/cs-cz/about-domain/thing" /><xhtml:link rel="alternate" hreflang="af-ZA" href="http://dev.domain.com/cz/cs-cz/about-domain/thing" /><xhtml:link rel="alternate" hreflang="ar-QA" href="http://dev.domain.com/cz/cs-cz/about-domain/thing" /><xhtml:link rel="alternate" hreflang="de-DE" href="http://dev.domain.com/de/de-de/applications" /><xhtml:link rel="alternate" hreflang="x-default" href="http://dev.domain.com/template/en-gb/" />
    </url><url>
        <loc>http://dev.domain.com/template/en-gb/about-domain-en</loc>
        <lastmod>2017-02-28</lastmod>


        <xhtml:link rel="alternate" hreflang="en" href="http://dev.domain.com/template/en-gb/about-domain-en" /><xhtml:link rel="alternate" hreflang="de-DE" href="http://dev.domain.com/template/de-de/uber-domain" /><xhtml:link rel="alternate" hreflang="en-PH" href="http://dev.domain.com/template/en-gb/about-domain-en" />
    </url><url>
        <loc>http://dev.domain.com/template/en-gb/about-domain/thing-en</loc>
        <lastmod>2016-10-20</lastmod>


        <xhtml:link rel="alternate" hreflang="en-GB" href="http://dev.domain.com/template/en-gb/about-domain/thing-en" /><xhtml:link rel="alternate" hreflang="de-DE" href="http://dev.domain.com/template/de-de/uber-domain/thing" /><xhtml:link rel="alternate" hreflang="en-PH" href="http://dev.domain.com/template/en-gb/about-domain/thing-en" />
    </url></urlset>

I can't see any issues with the XML and it looks to follow Google advice precisely. Am I safe to deploy this to production, or is Google going to penalise until I work out what the problem is here?

John Conde
  • 217,595
  • 99
  • 455
  • 496
Tom Troughton
  • 3,941
  • 2
  • 37
  • 77

1 Answers1

1

Sitemap only helps Google to understand how to crawl your page, in any case is going to penalize. In the case you dont have set it properly is not going to reduce your site current position in SERPs, but it can make some URLs that google did not know not to be indexed as long as they are not linked from anywhere.

Different is that the content of your URLs is not Google best practices compliant and then you get penalty from there.

Christian
  • 437
  • 1
  • 4
  • 13