Sitemap can be read, but has errors: Incorrect namespace

Created on 6 November 2023, about 1 year ago
Updated 2 February 2024, 10 months ago

Problem/Motivation

I've submitted the Google News sitemap in GSC but I still get a this message:

Your Sitemap or Sitemap index file does not properly declare the namespace.
Examples
Line 6
Parent tag: url
Tag: news

There is no validator and no explanation. For comparison:

GSC documentation example: https://developers.google.com/search/docs/crawling-indexing/sitemaps/new...

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
  <url>
    <loc>http://www.example.org/business/article55.html</loc>
    <news:news>
      <news:publication>
...

Drupal generated news sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="https://www.google.com/schemas/sitemap-news/0.9">
  
<url>
  <loc>https://www.example.com/news/2023/11/06/france-immigration-bill-threatens-rights</loc>
  <news:news>
            <news:publication>
💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

miiimooo Europe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024