Commit 40343bc
fix(seo): enable trailingSlash for consistent canonical/hreflang/sitemap URLs (#236)
Semrush flagged 9 hreflang conflicts because Vercel serves both /en and
/en/ as 200 (no redirect), so whichever form tags use conflicts with the
alternate crawled URL.
Fix: enable trailingSlash: true in Next.js config so Vercel redirects
/en → /en/ (308). Update page.tsx and sitemap generator to produce
trailing-slash URLs consistently across:
- <link rel="canonical">
- <link rel="alternate" hreflang>
- sitemap.xml <loc> and <xhtml:link>
Build tested locally — static export now generates directory-based
index.html files (en/index.html instead of en.html).
Co-authored-by: paperclip-resolver[bot] <3736210+paperclip-resolver[bot]@users.noreply.github.com>1 parent 2df01d8 commit 40343bc
3 files changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments