Best practice to redirects based on visitors' detected language
-
One of our websites has two languages, English and Italian.
The English pages are available at the root level:
www.site.com/ English homepage www.site.com/page1
www.site.com/page2The Italian pages are available under the /it/ level:
www.site.com/it Italian homepage www.site.com/it/pagina1
www.site.com/it/pagina2When an Italian visitor first visits www.mysit.com we'd like to redirect it to www.site.com/it but we don't know if that would impact search engine spiders (eg GoogleBot) in any way...
It would be better to do a Javascript redirect? Or an http 3xx redirect? If so, which of the 3xx redirect should we use?
Thank you
-
We've adopted the following solution:
we show the English homepage, but we determine the user's preferred language (from the Accept-Language header sent by the browser). If our site supports that language, we show a temporary balloon that highlights the related link to go to the localized homepage.
Thank you all for your hints and notes.
-
I would stay away from javascript redirects as it can be considered cloaking. Best thing to do is have a page for new visitors (those not having your cookie) and send them to a page that allows them to choose what language they want. You can then set a cookie so when they return it will automatically direct them to the right site.
By not doing any sneaky javascript redirects or IP redirects, you allow google the ability to crawl all the pages of your site and improve indexing, trust, etc etc... Also, I would go into Google webmaster tools and specify the country your /it pages are directed to. This will help in international search and trust from Google.
-
I've done a test with a simple ASP page with a Response.Redirect: <% Response.Redirect "test.htm" %>
This is what Fiddler has catched: HTTP/1.1 302 Object moved Server: Microsoft-IIS/5.1 Date: Thu, 05 May 2011 06:44:10 GMT X-Powered-By: ASP.NET Location: test.htm Content-Length: 121 Content-Type: text/html Cache-control: private <title>Object moved</title>
Object Moved
This object may be found <a href="">here</a>.
I don't think that 302 would be the best solution. As specified in the HTTP specs ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html ) wouldn't we prefer a 307 Temporary Redirect?
Thank you
-
You also asked about which 30x redirect to use. I'm also looking for this answer. We currently an ASP header redirect. I don't think this is best, but I'm not sure a 301 redirect can be used. I'd like to hear from others too.
This is what we have now:
lang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
real_lang = Left(lang,2)
'Response.Write real_lang
Select case real_lang
case "en"
Response.Redirect "/en"
case "fr"
Response.Redirect "/fr"
case "de"
Response.Redirect "/ge"
case else
Response.Redirect "/en"End Select
-
They automatically redirect people in the uk who type in www.google.com to www.google.co.uk
But, this is different from changing language on a visitor. I'm not sure what google would do if I was in Italy and used my american laptop to visit google.com. I don't think they'd switch me to www.google.it, but maybe someone else has this answer.
Using the browser language settings has worked well for us.
-
You might want to look into what Google do themselves.
They automatically redirect people in the uk who type in www.google.com to www.google.co.uk
If it's good enough for google it's good enough for us. Just make sure you do not look like you are cloaking.
You need to give users the ability to change language when they are on the website though. As Vince mentioned just because a user is visiting the website from Italy it does not mean that they are Italian.
-
Hi Daminao,
I do a redirect based on browser language. I'd stay away from IP/location based redirects. You can have English vistors in Italian locations that would be lost on your pages.
hth,
Vince
-
Hi Damiano,
Matt explained very good in this video and basically he answers all your question.
If you have additional Q. please let me know
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
-
Is single H1 tag still best practice?
Hi Guys, Is having a single h1 tag still best practice for SEO? Guessing multiple h1 tags dilute the value of the tag and keywords within the tag. Thoughts? Cheers.
Intermediate & Advanced SEO | | kayl870 -
Site still indexed after request 'change of address' search console
Hello, A couple of weeks ago we requested a change of address in Search console. The new, correct url is already indexed. Yet when we search the old url (with site:www.) we find that the old url is still indexed. Is there another way to remove old urls?
Intermediate & Advanced SEO | | conversal0 -
Legal Client Wants to Change Domain Name... What's the best way to pass authority from old domain?
Hey Mozzers,
Intermediate & Advanced SEO | | WhiteboardCreations
I received a call on Friday from a 6 attorney law office who have been my client for a long time. They have an established brand/domain in their market which isn't very big, but has a lot of competition. 2 of the attorneys are leaving to start their own firm and they want to remove a letter from their name abbreviation, thus their domain name as well. So, the other partners want to change the domain to reflect this. They want to buy a EMD [city]lawyers.com for about $1,600 along with some others to protect their new brand and name. I have a good idea as to what I need to do, BUT would love to hear advice from the community for this type of drastic change. 301 redirects? New Google Analytics code or same just different profile? Webmasters verifications? Content from old site? Old domain forwarding or keep active for a little bit? Is not the time to get them an SSL? Also, what should I prepare them for in terms of website traffic expectations and Google authority drops or remains the same? I know their Moz DA/PA will drop to 1/1, but anything else to look out for? Thank you in advance!
Fellow Pro Member - Patrick1 -
What to do about old urls that don't logically 301 redirect to current site?
Mozzers, I have changed my site url structure several times. As a result, I now have a lot of old URLs that don't really logically redirect to anything in the current site. I started out 404-ing them, but it seemed like Google was penalizing my crawl rate AND it wasn't removing them from the index after being crawled several times. There are way too many (>100k) to use the URL removal tool even at a directory level. So instead I took some advice and changed them to 200, but with a "noindex" meta tag and set them to not render any content. I get less errors but I now have a lot of pages that do this. Should I (a) just 404 them and wait for Google to remove (b) keep the 200, noindex or (c) are there other things I can do? 410 maybe? Thanks!
Intermediate & Advanced SEO | | jcgoodrich0 -
Redirect 301
Hi, I `m redirecting some pages in htaccess The first 15 pages that i redirected it worked. But the last 3 dont work, and i cant figure it out why it is not working. Redirect 301 /analyseverktoy/ /webanalyse
Intermediate & Advanced SEO | | SGacic
Redirect 301 /index.php/ledige-stillinger/ /
Redirect 301 /?page_id=352/ / Anu suggestions?0 -
Redirect a temporary IP
I was performing some development work on a client's site recently under a temporary location on the host's server, for example: http://11.22.33.444/~accountname/folder/page.html Google managed to index a couple of pages using this url 😞 I have updated DNS to the correct domain and the site is live, but I am a bit confused in regards to the correct way to create a 301 Redirect for this example or at least a way point it to our 404 page. I am hoping someone more proficient with htaccess can help me out a bit... Thanks!
Intermediate & Advanced SEO | | SCW0 -
Website Siloing..best practice?
Hi all I am doing some research this week on the effects of siloing a Magento site. We have about 1,654 pages with approx 1,400 products. We want to silo the website in order to address the internal linking issues and to also focus the customer journey in a more organised way. I need to report all of the possible angles and effects that this will have on the site, prior to implementing it. Does anyone have info on best practice for siloing? I'd appreciate any help... Thanks Nick
Intermediate & Advanced SEO | | Total_Displays0 -
301 Redirect shenanigans.
So our website (www.FrontlineMobility.com) Has a canonical link redirect to the non www. version. However when I put in website.com it comes up with a small list of links and says this site links to www.website.com. So I'm curious if I used to wrong canonical linking method( that is the method I tried and I placed it in the Head Tags.) I greatly appreciate any assistance in this matter ^.^
Intermediate & Advanced SEO | | FrontlineMobility0