Skip to content

CE: 404 page stops self-canonicalizing (SEO)#319

Merged
ericflo merged 2 commits intomainfrom
ce/404-no-self-canonical
Apr 16, 2026
Merged

CE: 404 page stops self-canonicalizing (SEO)#319
ericflo merged 2 commits intomainfrom
ce/404-no-self-canonical

Conversation

@ericflo
Copy link
Copy Markdown
Owner

@ericflo ericflo commented Apr 16, 2026

What

The 404 handler emitted <link rel=canonical> and og:url pointing to the missing URL, which Google guidance discourages (invites soft-404, can leak 404 URLs into search).

Verified live on 2026-04-16:

$ curl -s https://modelrelay.io/nonexistent-page-xyz | grep -E "canonical|og:url"
  <meta property="og:url" content="https://modelrelay.io/nonexistent-page-xyz">
  <link rel="canonical" href="https://modelrelay.io/nonexistent-page-xyz">

Fix

Pass / as the shell path so canonical + og:url point to the homepage. Adds a unit test covering the regression.

Test

cargo test -p modelrelay-cloud --lib -- not_found

@ericflo ericflo merged commit f619099 into main Apr 16, 2026
12 checks passed
@ericflo ericflo deleted the ce/404-no-self-canonical branch April 16, 2026 23:36
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.

1 participant