Multilingual Site and 301 redirection
-
Hey there awesome people of Moz
I have this site that has many languages in it.
The main language is English and my developer did the following
www.example.com ( is the main site ) which redirects with a 301 to www.example.com/en
if your geo location is supported by our languages then you will automatically be redirected to whatever language you have in your country but does the first language with is english have to 301 redirect to www.example.com/en ?
I thought that the right way is to just leave /en at the root file.
Thanks in advance
-
Hi Angelos.
You have a great question and there are a few ways to take this.
What I would recommend is having your www.example.com be a starter page that doesn't have your "homepage" content, but rather, asks people to pick a language. You can detect it from their browser settings or from the IP (whatever you do, do NOT redirect anything based on IP address) and prompt them from there, or just list them all. That page would be your x-default in HREFLANG terms. It's the page that doesn't have a language. Then all of the others would be linked to from there. This would of course have English as /en.
You don't have to do that though. If you prefer, you can totally have www.example.com as all English, and just have the other languages under their subfolders. I would detect if you think the user prefers one of the other languages and use Javascript to popup a prompt to ask if they would prefer that language. If they say yes, then set a cookie and take them there. If not, it keeps them on the English URLs.
Just please don't redirect anyone based on IP address. This can cause problems down the line.
I hope that helps.
-
For the other languages, it's going to be a conditional redirect, which is best handled by 302. Here it is from Google: http://googlewebmastercentral.blogspot.com/2014/05/creating-right-homepage-for-your.html :
A third scenario would be to automatically serve the appropriate HTML content to your users depending on their location and language settings. You will either do that by using server-side 302 redirects or by dynamically serving the right HTML content.
Remember to use x-default rel-alternate-hreflang annotation on the homepage / generic page even if the latter is a redirect page that is not accessible directly for users.
Note: Think about redirecting users for whom you do not have a specific version. For instance, French-speaking users on a website that has English, Spanish and Chinese versions. Show them the content that you consider the most appropriate.
Cheers!
-
Why use a 302?
-
Hi Angelos. I agree. Having a 301 redirect that's always in place for going to /en is a bit redundant. If /en is the default option the default should be the root.
Other redirection should be handled via 302 to the various languages with all the proper href-lang and alternate attributes. Per Google, "For language/country selectors or auto-redirecting homepages, you should add an annotation for the hreflang value "x-default" as well: " Cheers!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Site Speed Testing Tools For Production Sites
Hi Guys, Any free site speed testing tools for sites in production, which are password protected? We want to test site speed before the new site goes live on top priority pages. Site is on Shopify – we tried google page insights while being logged into the production site but believe its just recording the speed of the password page. Cheers.
Intermediate & Advanced SEO | | brandonegroup1 -
301 Redirect to Home Page or Sub-Page?
What do you think about 301 redirect of good expired domain to a sub-page instead of the home page? I'm doing this so I don't hurt my brand name. Let me know your thoughts please. Thank you
Intermediate & Advanced SEO | | JuanWork0 -
Spammy sites that link to a site
Hello, What is the best and quickest way to identify spammy sites that link to a website, and then remove them ( google disavow?) Thank you dear Moz, community - I appreciate your help 🙂 Sincerely, Vijay
Intermediate & Advanced SEO | | vijayvasu0 -
Merging Sites: Will redirecting the old homepage to an internal page on the new site cause issues?
I've ended up with two sites which have similar content (but not duplicate) and target similar keywords, rather than trying to maintain two sites I would like to merge the sites together. The old site is more of a traditional niche site and targets a particular set of keywords on its homepage, the new site is more of an authority site with a magazine type homepage and targets the same set of keywords from an internal page. My question is: Should I redirect the old site's homepage to the relevant internal page on the new website...
Intermediate & Advanced SEO | | lara_dar
...or should I redirect the old site's homepage to the new site's homepage? (the old site's homepage backlinks are a mixture of partial match keyword anchor text, naked URLs and branded anchor text) I am in two minds (a & b!) (a) Redirecting to the internal page would be great for ranking as there are some decent backlinks and the content is similar (b) But usually when you do a 301 redirect the homepage usually directs to the new homepage and some of the old site's links are related to the domain rather than the keyword (e.g. http://www.site.com) and some people will be looking for the site's homepage. What do you think? Your help is much appreciated (and hope this makes sense...!)0 -
301 Redirecting an Entire Site
I have a question which has had me thinking for hours..... If SITE A is ranking well on a number of search phrases and you 301 that site to another (SITE B). The site will change on the Google SERPs to the site which you've re-directed to... In this case SITE B. But how do you maintain the rankings of SITE A?. Do you keep the rankings of SITE A forever? Or will your rankings of SITE A (now SITE B) gradually slip as other sites rank higher? As you can no longer edit SITE A does Google take into consideration the content on SITE B and no longer take anything that SITE A had to offer into consideration? SITE B has simply replaced it in the SERPs??...... Please can anybody help? Thanks,
Intermediate & Advanced SEO | | karl620 -
Does 301 Redirect works on social signals?
Hello, I'm considering strategic change in my site's formation.
Intermediate & Advanced SEO | | BeytzNet
301 redirecting some of the pages is not a problem but the question remains - what will happen with all of my social signals? These pages have Likes, plus ones, and tweets. Thanks0 -
How to use modrewrite to redirect certain portions of a site
Hello! My question is as follows: Suppose there is SiteA which is a blog that has a url structure of http://www.siteA.com/blog/category/article Now suppose I'd like to redirect those articles to a new domain (which has the same url structure) BUT excluding a certain category, say, 'blah/' so in other words, some examples: http://www.siteA.com/blog/shoes/best-shoes-to-buy ->redirects-> http://www.siteB.com/blog/shoes/best-shoes-to-buy/ (there is a trailing slash here for some reason) BUT http://www.siteA.com/blog/blah/foo-bar -NO REDIRECT- (because it's in the /blah/ category). Any and all feedback & help would be much appreciated 🙂 Thanks!~
Intermediate & Advanced SEO | | apo11o1770 -
On-Site Optimization Tips for Job site?
I am working on a job site that only ranks well for the homepage with very low ranking internal pages. My job pages do not rank what so ever and are database driven and often times turn to 404 pages after the job has been filled. The job pages have to no content either. Anybody have any technical on-site recommendations for a job site I am working on especially regarding my internal pages? (Cross Country Allied.com) Any help would be much appreciated.
Intermediate & Advanced SEO | | Melia0