Skip to content

Fix canonical URLs to use absolute site URL#39

Merged
stefan-burke merged 1 commit into
mainfrom
claude/fix-canonical-urls-oT9Db
May 14, 2026
Merged

Fix canonical URLs to use absolute site URL#39
stefan-burke merged 1 commit into
mainfrom
claude/fix-canonical-urls-oT9Db

Conversation

@stefan-burke
Copy link
Copy Markdown
Member

Summary

  • Replaced hardcoded relative canonicals (./, ../packages/, etc.) with a shared _includes/canonical.html that emits https://www.completemarquees.co.uk{{ page.url }}
  • The include omits the tag entirely on pages with no_index: true (currently thank-you and not-found / 404)
  • Added the canonical to the complete-marquees.html layout so plain content pages get one too

Test plan

  • bun run build succeeds
  • Verified canonicals in _site/ resolve to absolute URLs (homepage, locations, service pages, packages, sizes-prices, contact-us, client-testimonials, yoast pages)
  • Verified _site/bunnycdn_errors/404.html and _site/thank-you/index.html contain noindex and NO canonical tag

https://claude.ai/code/session_017JUGiPfeTRyxmvycehJHzM


Generated by Claude Code

Replace hardcoded relative canonicals (./, ../packages/, etc.) with a
shared _includes/canonical.html that emits the absolute URL from page.url
and omits the tag entirely on no_index pages.

https://claude.ai/code/session_017JUGiPfeTRyxmvycehJHzM
@stefan-burke stefan-burke merged commit 17300dd into main May 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants