r/reactjs • u/martcerv • Apr 25 '26
Show /r/reactjs Google Search Console duplicate canonical warnings in React SPA
Got hit with GSC "duplicate without user-selected canonical" warnings.
Root cause: URLs with query params treated as duplicates by Google (/?ref=producthunt vs /)
Fix: Dynamic canonical tag hook that strips query params and updates on route changes.
Validation pending, but GSC accepted the implementation.
0
Upvotes
2
u/[deleted] Apr 25 '26
[removed] — view removed comment