Skip to main content
XMLDir

Search 309 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, blog and product.

XML sitemap

<news:news>

The Google News extension: a publication block and a publication date, on URLs from the last two days only.

<news:news> requires two children — <news:publication>, itself carrying a name and a language, and <news:publication_date>. A news sitemap is also unusual in being time-bounded: it should list only articles published in the last 48 hours, and older entries are expected to be removed rather than accumulated.

The date is a W3C Datetime, and unlike an ordinary <lastmod> it is normally the full form with a time and offset, because two articles the same day are not interchangeable.

What it contains

  • news:publicationrequiredCarries <news:name> and <news:language>.
  • news:publication_daterequiredW3C Datetime.
  • news:titlerequiredThe article headline.

Cardinality and constraints

At most one per <url>.

  • Requires xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" on the root.
  • Only articles from the last two days belong in a news sitemap.
  • A news sitemap should hold at most 1,000 URLs, an order of magnitude below the ordinary limit.

What our validator does

Not inspected. Our checks read the sitemaps.org elements, so a news block missing a required child produces no issue here.

We do not catch this one

There is no <news:publication> and no <news:publication_date>, so Google News has nothing to file the article under. Our sitemap checks do not read the extension, and report nothing for either document.

Broken and fixed

Both documents below are well-formed XML — that is the point of this corpus — and both are run through the validator on every test run. The verdicts here are what it returned, not what we expect it to.

broken
<?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>https://example.com/story</loc>
    <lastmod>2026-08-10</lastmod>
    <news:news>
      <news:title>Hen lays egg</news:title>
    </news:news>
  </url>
</urlset>
No issue reported. This defect passes our checks.
fixed
<?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>https://example.com/story</loc>
    <lastmod>2026-08-10</lastmod>
    <news:news>
      <news:publication>
        <news:name>Example Times</news:name>
        <news:language>en</news:language>
      </news:publication>
      <news:publication_date>2026-08-10T09:00:00+00:00</news:publication_date>
      <news:title>Hen lays egg</news:title>
    </news:news>
  </url>
</urlset>
No errors. Warnings may remain — a conforming feed can still be missing a self link — but nothing here is wrong.

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.