The sitemap that shipped pointing at localhost
Logged
Deployment · SEO · Failure modes
One hundred and twelve canonical URLs, every one of them addressed to a development server that only exists on one laptop.
A generated sitemap builds its URLs from a base. If that base falls back to the dev server when an environment variable is missing, nothing breaks locally, nothing breaks in review, and the build passes. It only breaks in the one place nobody looks after launch.
This is the whole class of bug I find most instructive, because it is invisible to every check we normally run. Types are fine. The build is fine. The page renders. Lighthouse is happy. The failure is entirely in a file written for machines, and the machines will not complain — they will just quietly ignore the site.
The fix is trivial. The lesson is not: any value that differs between local and production needs to fail loudly when it is absent, rather than falling back to something plausible. A fallback that looks reasonable is worse than a crash, because a crash gets fixed on day one.