fix(web): remove trailing slashes from URLs for SEO #2927
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes duplicate URL issue where both
/blog/otter-ai-review/and/blog/otter-ai-reviewresolve to the same content, which is bad for SEO.Changes:
trailingSlash: "never"to TanStack Router configuration to ensure client-side navigation uses non-trailing-slash URLsFixes #2925
Updates since last revision
The final change is minimal - just the
trailingSlash: "never"router configuration. An initial attempt to add a Netlify redirect rule was reverted as it caused redirect loops with TanStack Start's SSR routing.Note on CI: The
web_cicheck failed due to a timing issue where Playwright tests ran against the old Netlify deployment before the new one was ready. Manual testing confirms the new deployment works correctly (HTTP 200, no redirect loops). The CI may need to be re-run.Review & Testing Checklist for Human
/download,/blog/otter-ai-review, etc.)Recommended test plan: Open the Netlify preview deployment, navigate through several pages using internal links, and verify the URL bar never shows trailing slashes. Test
curl -I https://deploy-preview-2927--hyprnote.netlify.app/download/to confirm trailing slash URLs redirect properly without loops.Note: This change primarily affects client-side navigation. Server-side requests with trailing slashes will get a 307 redirect to the non-trailing-slash version (handled by TanStack Start's SSR routing).
Notes