From 5280054d3207482699784daba21ffb654eaddb37 Mon Sep 17 00:00:00 2001 From: "juancarlos.cavero" Date: Mon, 27 Jul 2026 12:35:45 +0200 Subject: [PATCH] fix(seo): stop the 404 page claiming to be authored content The 404 was rendered through the same template as the comparison pages, so it carried a byline and "Published 2024-06-01 / Updated 2026-07-27", and its schema declared an Article with an author and a publication date. Both assert authorship of a page nobody wrote, and the date read as a bug to anyone who landed on it. noindex pages now render without the byline and describe themselves as a plain WebPage. Verified: 404.html has no byline, no datePublished anywhere, and a WebPage node; the real pages keep their byline and Article node unchanged. --- dashboard/seo/render.js | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/dashboard/seo/render.js b/dashboard/seo/render.js index b3da93e..a3a3155 100644 --- a/dashboard/seo/render.js +++ b/dashboard/seo/render.js @@ -156,7 +156,21 @@ const articleNode = (page) => ({ }) const buildGraph = (page) => { - const graph = [orgNode(), breadcrumbNode(page), articleNode(page)] + // Error pages are described as a plain WebPage. Emitting an Article for one + // would assert an author and a publication date for content nobody wrote. + const main = page.noindex + ? { + '@type': 'WebPage', + '@id': `${SITE.url}${page.path}#webpage`, + name: page.h1, + description: page.description, + url: `${SITE.url}${page.path}`, + inLanguage: 'en-US', + publisher: { '@id': `${SITE.url}/#organization` }, + } + : articleNode(page) + + const graph = [orgNode(), breadcrumbNode(page), main] if (page.faq?.length) graph.push(faqNode(page)) if (page.extraNodes) graph.push(...page.extraNodes) return { '@context': 'https://schema.org', '@graph': graph } @@ -241,11 +255,18 @@ ${NAV}
${crumbs}

${esc(page.h1)}

-` +}
TL;DR${page.tldr.map((p) => `

${p}

`).join('')}
${page.body} ${relatedBlock(related)}