Dan Crews
Dan Crews

Reputation: 393

Rails I18n and SEO - Are HTTP Redirects Necessary?

I currently have an English language Rails application that I am internationalizing to support Chinese(zh) translations.

The original URL structure is standard: www.mysite.com, www.mysite.com/pages, ...

I've implemented the I18n using the standard Rails gem implementation, using the subfolder approach.

I now see the following:

Will the new route, www.mysite.com/en, affect the link juice already attributed to www.mysite.com?

If yes, how do I redirect so that the English pages remain as www.mysite.com/ vs www.mysite.com/en/?

How do I ensure that going to www.mysite.com always displays the English homepage, regardless of current language selection, and www.mysite.com/zh/ is the only way to display the Chinese homepage?

note: Language selection is chosen by the user through a button in the header - no geolocation, browser language settings, etc.

Upvotes: 2

Views: 366

Answers (1)

L Martin
L Martin

Reputation: 1190

Will the new route, www.mysite.com/en, affect the link juice already attributed to www.mysite.com?

Using a consistent 301 redirect will not impact it much at all. Assuming your users come from Google, the new link will eventually replace the old link - and any minor penalties from redirects will dissolve as old backlinks fade and new ones reference the new 'main' page.

If yes, how do I redirect so that the English pages remain as www.mysite.com/ vs www.mysite.com/en/?

You can host the english just on the root if you want. Or on /en/. But don't do both. This duplicates the content and confuses Google unless you use a rel=canonical to tell it which is the default. If you're running a multi lingual site - you want different directories for different languages. Set the language they choose via Cookie and you can redirect when the arrive to the correct page then.

How do I ensure that going to www.mysite.com always displays the English homepage, regardless of current language selection, and www.mysite.com/zh/ is the only way to display the Chinese homepage?

I've a better question - do you expect your users to always discover you via Google? If so, use hreflang codes either on your pages or sitemap (or both). This will ensure only the relevant language page comes up in a search from your targeted language region. You can broadly target 'en' rather than a region specific code and this will work.

Upvotes: 2

Related Questions