<?xml version="1.0" encoding="UTF-8"?>
<!--
  Sitemap for treemap.wales and mapcoed.cymru.

  WHY THIS FILE EXISTS. Until 2026-10-24 there was no sitemap, yet /sitemap.xml returned HTTP 200
  with the React app in the body, because the SPA fallback answered for it. Crawlers were being
  handed a web page and told it was a sitemap: in the eleven days to 2026-10-24, ClaudeBot fetched
  it 86 times and SemrushBot, QlyzeBot, Dataprovider and Meta-WebIndexer once each, every one of
  them receiving HTML with a 200. nginx now has an exact-match `location = /sitemap.xml` so a
  missing file returns a real 404 instead.

  WHY TWO DOMAINS IN ONE SITEMAP. The same container serves both hosts, so this one file is what
  both return. Listing a URL on another host is legitimate here because both domains are verified
  in the same Search Console account (both verified 2026-10-24), which is exactly the condition
  Google requires for cross-submission.

  THE hreflang ANNOTATIONS WERE ADDED ONLY ONCE THEY WERE TRUE. When this file was first written
  they were deliberately left out, because mapcoed.cymru was still serving `<html lang="en">` with
  an English title and an og:url pointing at treemap.wales - declaring it the Welsh alternate would
  have been a half-true claim, and the standard's rule is never to name a resource that does not
  exist. ADR-0013 settled the addressing, and as of commit b837bfa the Welsh domain serves genuinely
  Welsh HTML with its own canonical. The claim is now accurate, so it is made.

  Note the reciprocity rule: every document in an hreflang set must list every document in the set,
  INCLUDING ITSELF. Google discards one-way annotations. So both <url> entries below carry the same
  three alternates, and the HTML head of each page carries them too.

  WHY ONLY TWO URLS, AND WHY THAT IS CORRECT. This is a single-page application: one address per
  language, so Search Console will report "Discovered URLs: 1" per property. That is the expected
  reading, not a fault. Raising it is Stage 2 of the Geodat standard: static per-dataset and
  per-area pages generated from data the pipeline already publishes, which is where this site's
  seven datasets and 4,530 areas become a long-tail search asset.

  LASTMOD is the date the pages themselves last changed, not the date this file was edited. Both
  heads changed on 2026-10-24 (canonical, hreflang, structured data, Welsh variant). Bump it
  whenever the markup changes again.

  Geodat standard: platform-docs/standard-seo-and-discoverability.md, Stage 1 items 4, 5 and 13.
  changefreq and priority are omitted on purpose: Google ignores both, so they are noise that
  would only drift out of date.
-->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">

  <!-- English. -->
  <url>
    <loc>https://treemap.wales/</loc>
    <lastmod>2026-10-24</lastmod>
    <xhtml:link rel="alternate" hreflang="en-GB" href="https://treemap.wales/"/>
    <xhtml:link rel="alternate" hreflang="cy-GB" href="https://mapcoed.cymru/"/>
    <xhtml:link rel="alternate" hreflang="x-default" href="https://treemap.wales/"/>
  </url>

  <!-- Welsh. Served by the same container: Front Door matches the hostname and rewrites "/" to
       /cy/index.html, which the build generates from cy.json. See ADR-0013. -->
  <url>
    <loc>https://mapcoed.cymru/</loc>
    <lastmod>2026-10-24</lastmod>
    <xhtml:link rel="alternate" hreflang="en-GB" href="https://treemap.wales/"/>
    <xhtml:link rel="alternate" hreflang="cy-GB" href="https://mapcoed.cymru/"/>
    <xhtml:link rel="alternate" hreflang="x-default" href="https://treemap.wales/"/>
  </url>

  <!-- Area pages, generated by scripts/build-area-pages.mjs (ADR-0014). -->
  <url>
    <loc>https://treemap.wales/area/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/neath-port-talbot/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/rhondda-cynon-taf/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/caerphilly/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/merthyr-tydfil/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/carmarthenshire/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/bridgend/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/monmouthshire/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/torfaen/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/denbighshire/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/ceredigion/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/gwynedd/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/powys/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/blaenau-gwent/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/conwy/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/swansea/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/cardiff/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/newport/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/flintshire/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/pembrokeshire/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/wrexham/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/vale-of-glamorgan/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>
  <url>
    <loc>https://treemap.wales/area/isle-of-anglesey/</loc>
    <lastmod>2026-07-13</lastmod>
  </url>

</urlset>
