Next.js sites using process.env.SITE_URL || 'http://localhost:3000' as a canonical URL fallback will fail Google indexing entirely. The fix: one centralised getPublicSiteUrl() helper replacing all scattered inline fallbacks. 13 files, 18 lines of code, zero pages indexed before, full indexing restored after.




The one where I made myself...