A production build here emits two different origins for the same page:
canonical / og:url -> https://lastsoulultra.hq.training/coaching
sitemap / robots -> https://www.lastsoulultra.com/coachingBoth are behaving as written. resources/data/site.ts derives siteOrigin from APP_URL, deliberately, so a canonical never names a host the build does not serve. scripts/seo.ts uses publishedOrigin, which is SITE_ORIGIN or https://www.lastsoulultra.com, and its comment explains exactly why it cannot follow APP_URL.
The gap is that one variable does not control both. A deploy that sets APP_URL=https://lastsoulultra.hq.training (which commit 5e808e0 suggests is the deploy target) and leaves SITE_ORIGIN unset ships a page whose canonical points at the deploy host while its own sitemap points somewhere else. A canonical naming a non-production host is the version search engines keep.
Not changing it blind, because which origin is correct depends on where the site actually serves from:
- if production is
www.lastsoulultra.com,APP_URLshould say so at build time - if production is
lastsoulultra.hq.training, the committed sitemap andtests/seo.test.tsare pinned to the wrong domain
Worth either making siteOrigin prefer SITE_ORIGIN before falling back to APP_URL, so one variable governs every published URL, or asserting at build time that the two agree when NODE_ENV=production.