Google: Your Sitemap or Sitemap index file doesn't properly declare the namespace.
fillon opened this issue · 10 comments
Hi,
Since the last release, Google Console is complaining about the namespaces using https.
--
Your Sitemap or Sitemap index file doesn't properly declare the namespace. Expected: http://www.w3.org/1999/xhtml Found: https://www.w3.org/1999/xhtml
Parent tag: url
Tag: link
Thanks for the report, will take a look today.
We are receiving this exact error and I believe the issue is related to my fix : #48
The address is not actually uri but a schema reference in the format of a uri and discussed in official docs as a uri reference which leads to nothing but confusion.
@ThePixelDeveloper any plans to merge this?
Given this error, which I'm also going to land up experiencing in the development of rockettpw/markup-sitemap for ProcessWire, does it actually make a difference in rankings? Can the error be ignored?
@mikerockett google just abandoned my sitemap with this error
@hotrush That sucks. Seems like such a rudimentary thing that doesn't make much of a difference, especially considering the https-everywhere concept that they love oh-so-much.
@ThePixelDeveloper, please can we have #48 merged? Not sure on the TCI failures...
@terales I'll have a look tomorrow. Hoping it's a minor thing...
The diff engine is showing the the output is different, but they're identical. Not a phpspec user, so not sure what's going on here.
Example diff:
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"?>
-<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml">
- <url>
- <loc>https://www.example.com/english/</loc>
- <xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/>
- <xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/>
- <xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/>
- </url>
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"?>
+<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="https://www.w3.org/1999/xhtml">
+ <url>
+ <loc>https://www.example.com/english/</loc>
+ <xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/>
+ <xhtml:link rel="alternate" hreflang="de-ch" href="https://www.example.com/schweiz-deutsch/"/>
+ <xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/"/>
+ </url>
</urlset>
Edit: by the way, I get four failures instead of the two shown on TCI builds. Using Windows if it means anything...
it should format a sitemapindex with n sitemaps
it should generate a sitemap of images
it should generate a sitemap with links
it should write processing instructions
They all appear to do the same thing, failing on identical content. I've checked encoding as well, but not sure if that makes a difference to the engine... @ThePixelDeveloper Please can you investigate?