Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoiding duplicate content SEO penalty #66

Open
clickworkorange opened this issue Aug 21, 2017 · 2 comments
Open

Avoiding duplicate content SEO penalty #66

clickworkorange opened this issue Aug 21, 2017 · 2 comments

Comments

@clickworkorange
Copy link

clickworkorange commented Aug 21, 2017

This routing filter gem has proven a real gem for us over the years, and have allowed us to build a hugely complex multi-lingual and multi-regional, multi-store platform which never seems to miss a beat. It's been great to be able to accept requests both with and without a country prefix, and transparently send the user to the best matching content based on their location and language settings. It really is super awesome. But our clients have been complaining that they get penalised by google search engines since the same content is available on both /somepage and /DE/somepage, which makes sense I guess, though I always used to think this was a huge bonus; for example you can share a link to a product which automagically takes anyone who follows it to the correct language, currency and availability for that product in their region, while still allowing country specific URLs to always take you to the same store/currency - but google search engines disagree.

Now I'm tasked with finding a way to turn every request for a page that doesn't have a country prefix into a permanent redirect to the corresponding page with country (regardless of whether this might result in a 404), without breaking anything else. But how? Since the routing filter has modified the request.original_fullpath I cannot look at this to determine whether a country was given or not, and I cannot set up the redirect inside the routing filter itself. Furthermore, the redirect cannot be done at the proxy either, since we need access to the platform configuration and database to determine whence to send the user. Only a redirect done by the Rails platform has any chance of getting them to the right place. I've spent quite some time scratching my head over this but cannot find an angle. Help?

@mcmegavolt
Copy link

Yes, that's the big problem in SEO ((((

route / or /page/1 need to be redirected to the /en or /en/some_page (default locale)

I need such an option too...

@simi
Copy link
Collaborator

simi commented Dec 30, 2017

Can you prepare example minimal app for me with failing test or failing test case in this repo for me so I can start quickly to inspect and prepare some solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants