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
-
Someone redirected his website to ours
Hi all, I have strange issue as someone redirected website http://bukmachers.pl to ours https://legalnibukmacherzy.pl We don't know exactly what to do with it. I checked backlinks and the website had some links which now redirect to us. I also checked this website on wayback machine and back in 2017 this website had some low quality content but in 2018 they made similar redirection to current one but to different website (our competitor). Can such redirection be harmful for us? Should we do something with this or leave it, as google stop encouraging to disavow low quality links.
Intermediate & Advanced SEO | | Kahuna_Charles1 -
Is it best practice to have a canonical tags on all pages
The website I'm working on has no canonical tags. There is duplicate content so rel=canonicals need adding to certain pages but is it best practice to have a tag on every page ?
Intermediate & Advanced SEO | | ColesNathan0 -
NGinx rule for redirecting trailing '/'
We have successfully implemented run-of-the-mill 301s from old URLs to new (there were about 3,000 products). As normal. Like we do on every other site etc. However, recently search console has started to report a number of 404s with the page names with a trailing forward slash at the end of the .html suffix. So, /old-url.html is redirecting (301) to /new-url.html However, now for some reason /old-url.html/ has 'popped up' in the Search Console crawl report as a 404. Is there a 'blobal' rule you can write in nGinx to say redirect *.html/ to */html (without the forward slash) rather than manually doing them all?
Intermediate & Advanced SEO | | AbsoluteDesign0 -
Redirecting from _ to - ?
hi everyone, I need your help! 🙂 What's the best way to redirect a lot of urls from sign _ to sign - ? We changed our e-shop CMS and we don't use that _ anymore. We have more than 100.000 URLs and you can imagine that we don't to do by hand. Any chance of doing it with .htaccess easily? Thanks!
Intermediate & Advanced SEO | | FCRMediaLietuva0 -
'?q=:new&sort=new' URL parameters help...
Hey guys, I have these types of URLs being crawled and picked up on by MOZ but they are not visible to my users. The URLs are all 'hidden' from users as they are basically category pages that have no stock, however MOZ is crawling them and I dont understand how they are getting picked up as 'duplicate content'. Anyone have any info on this? http://www.example.ch/de/example/marken/brand/make-up/c/Cat_Perso_Brand_3?q=:new&sort=new Even if I understood the technicality behind it then I could try and fix it if need be. Thanks Guys Kay
Intermediate & Advanced SEO | | eLab_London0 -
Duplicate Content www vs. non-www and best practices
I have a customer who had prior help on his website and I noticed a 301 redirect in his .htaccess Rule for duplicate content removal : www.domain.com vs domain.com RewriteCond %{HTTP_HOST} ^MY-CUSTOMER-SITE.com [NC]
Intermediate & Advanced SEO | | EnvoyWeb
RewriteRule (.*) http://www.MY-CUSTOMER-SITE.com/$1 [R=301,L,NC] The result of this rule is that i type MY-CUSTOMER-SITE.com in the browser and it redirects to www.MY-CUSTOMER-SITE.com I wonder if this is causing issues in SERPS. If I have some inbound links pointing to www.MY-CUSTOMER-SITE.com and some pointing to MY-CUSTOMER-SITE.com, I would think that this rewrite isn't necessary as it would seem that Googlebot is smart enough to know that these aren't two sites. -----Can you comment on whether this is a best practice for all domains?
-----I've run a report for backlinks. If my thought is true that there are some pointing to www.www.MY-CUSTOMER-SITE.com and some to the www.MY-CUSTOMER-SITE.com, is there any value in addressing this?0 -
Anyone managed to change 'At a glance:' in local search results
On Google's local search results, i.e when the 'Google places' data is displayed along with the map on the right hand side of the search results, there is also an element 'At a glance:'
Intermediate & Advanced SEO | | DeanAndrews
The data that if being displayed is from some years ago and the client would if possible like it to reflect there current services, which they have been providing for some five years. According to Google support here - http://support.google.com/maps/bin/answer.py?hl=en&answer=1344353 this cannot be changed, they say 'Can I edit a listing’s descriptive terms or suggest a new one?
No; the terms are not reviewed, curated, or edited. They come from an algorithm, and we do not help that algorithm figure it out. ' My question is has anyone successfully influenced this data and if so how.0 -
Best Practice for Inter-Linking to CCTLD brand domains
Team, I am wondering what people recommend as best SEO practice to inter-link to language specific brand domains e.g. : amazon.com
Intermediate & Advanced SEO | | tomypro
amazon.de
amazon.fr
amazon.it Currently I have 18 CCTLDs for one brand in different languages (no DC). I am linking from each content page to each other language domain, providing a link to the equivalent content in a separate language on a different CCTLD doamin. However, with Google's discouragement of site-wide links I am reviewing this practice. I am tending towards making the language redirects on each page javascript driven and to start linking only from my home page to the other pages with optimized link titles. Anyone having any thoughts/opinions on this topic they are open to sharing? /Thomas0