Repository navigation
Conversation
…acement) scripts/seo-check.mjs crawls every sitemap URL against the deployed site and asserts: HTTP 200, exactly one canonical tag matching the sitemap URL, no noindex on public pages; plus the deliberate noindex on app routes and a real 404 (never a soft 404) for unknown paths. Accepts a base URL so the same check can gate a preview deploy before it ships. Grounded in the October canonical-exclusion incident, where Google picked the github.io origin over the custom domain for the homepage. Co-authored-by: MaxwithU19 <156198184+MaxwithU19@users.noreply.github.com>
manav4u
force-pushed
the
seo/sitemap-canonical-check
branch
from
November 2, 2026 12:47
7824134 to
7cf2456
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scripts/seo-check.mjs- a dependency-free Node script that runs live SEO sanity checks against the deployed site:sitemap.xmland crawls every listed URL (170 today), asserting: HTTP 200, exactly onerel=canonicaltag, canonical equals the sitemap URL, and nonoindexon public pages./app/,/app/settings/,/onboarding/serve 200 with noindex./syllabus/__seo-check-missing__/) return a real HTTP 404 with the noindex shell - never a soft 404.node scripts/seo-check.mjs <preview-url>) so the same check can gate a preview deploy before it ships.Why
Grounded in the October homepage canonical-exclusion incident: Google dropped the homepage after selecting the github.io origin as canonical (
Duplicate, Google chose different canonical than user). A canonical check on every sitemap URL catches that class of problem at ship time instead of weeks later in Search Console. The soft-404 assertion locks in the postbuild 404 behavior.Verification
node scripts/seo-check.mjsagainst production: 170 sitemap URLs, PASS (run Nov 2, 2026).Prep-only PR per standing workflow: review before merge.