transitive-bullshit / nextjs-notion-starter-kit

Deploy your own Notion-powered website in minutes with Next.js and Vercel.
https://transitivebullsh.it/nextjs-notion-starter-kit
MIT License
6.28k stars 5.29k forks source link

SEO improvements: In production we should redirect or add canonical tag to the duplicate pages #654

Open onnimonni opened 1 week ago

onnimonni commented 1 week ago

Description

Google Search console is complaining that my site has duplicate pages without canonical tag. I think it would be better to just redirect them in production so that the pretty urls will always be used.

For example google is somehow able to find these 2 pages which are duplicates and ideally only the first one would be used:

https://keksi.io/opettaja https://keksi.io/c2b868f78b524954b2c13da26c587413?pvs=25

This should again help with the SEO because google penalizes for duplicate content.

I would be happy to help but I'm not sure how to fix this 🤔. Maybe comparing if the URL is same as the pageid in production and then redirecting.