Skip to content

fix(seo): vercel.json trailingSlash for edge redirects#239

Merged
Mlaz-code merged 1 commit into
mainfrom
fix/vercel-trailing-slash
May 21, 2026
Merged

fix(seo): vercel.json trailingSlash for edge redirects#239
Mlaz-code merged 1 commit into
mainfrom
fix/vercel-trailing-slash

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

Adds trailingSlash: true to vercel.json so Vercel enforces 308 redirects at the edge (/en/en/). Without this, both URL forms return 200 and Semrush flags hreflang conflicts on both variants.

Also updates the root redirect //en/ to avoid a double redirect chain.

Context

PR #236 added trailingSlash: true to next.config.mjs (build output) but Vercel static hosting needs the setting in vercel.json to enforce edge redirects.

The Next.js trailingSlash config only affects build output (generating
en/index.html vs en.html). Vercel static hosting still serves both /en
and /en/ as 200 without redirecting. Adding trailingSlash: true to
vercel.json makes Vercel enforce 308 /en → /en/ at the edge, so Semrush
sees a single canonical URL form.

Also updates root redirect / → /en/ to avoid double redirect.
@Mlaz-code Mlaz-code merged commit 57c9576 into main May 21, 2026
@Mlaz-code Mlaz-code deleted the fix/vercel-trailing-slash branch May 21, 2026 19:18
@Mlaz-code
Copy link
Copy Markdown
Collaborator Author

Merge gate (auto-classified): gate=smoke-passed — auto-classified by the gate-log enforcer (12min after merge, no Merge gate: audit comment found). Reviewer agent: please correct if wrong by replying with Merge gate: gate=<correct-word> — <evidence>. The audit log keys on the first such token; your correction overrides this auto-classified guess.

Posted by scripts/gate-log-enforcer.py because instruction-level rules about the gate= template aren't binding (0/N adoption); structural enforcement fills the log either way.

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