Commit 2df01d8
fix(seo): add trailing slash to homepage canonical/hreflang URLs (#235)
Semrush flagged 9 hreflang conflicts on locale homepages (/en/, /de/,
/es/, /pt-BR/) because canonical and hreflang tags pointed to /en
(no trailing slash) while the page is served at /en/ (with trailing
slash). This caused "Conflicting hreflang and rel=canonical" and
"No self-referencing hreflang" errors.
Fix: append trailing slash to path and subPath when mdxPath is empty
(homepage). Deep page URLs are unchanged.
Co-authored-by: paperclip-resolver[bot] <3736210+paperclip-resolver[bot]@users.noreply.github.com>1 parent c8b0c8f commit 2df01d8
1 file changed
Lines changed: 2 additions & 2 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 | | |
| |||
0 commit comments