The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Best practice to redirects based on visitors' detected language

    Best practice to redirects based on visitors' detected language

    Intermediate & Advanced SEO
    9 5 24.4k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Damiano
      Damiano last edited by

      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/page2

      The Italian pages are available under the /it/ level:
      www.site.com/it   Italian homepage www.site.com/it/pagina1
      www.site.com/it/pagina2

      When 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

      1 Reply Last reply Reply Quote 0
      • wissamdandan
        wissamdandan last edited by

        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

        watch?v=7paVYBgH0Hw

        1 Reply Last reply Reply Quote 0
        • vheilman
          vheilman last edited by

          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

          1 Reply Last reply Reply Quote 1
          • A_Q
            A_Q last edited by

            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.

            vheilman 1 Reply Last reply Reply Quote 0
            • vheilman
              vheilman @A_Q last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • vheilman
                vheilman last edited by

                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

                Damiano 1 Reply Last reply Reply Quote 0
                • Damiano
                  Damiano @vheilman last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • CoolSEOnStuff
                    CoolSEOnStuff last edited by

                    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.

                    Damiano 1 Reply Last reply Reply Quote 0
                    • Damiano
                      Damiano @CoolSEOnStuff last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      • Best practice to redirect all 404s?
                        KevinBudzynski
                        KevinBudzynski
                        0
                        2
                        65

                      • Best SEO practice for multiple languages in website
                        vtmoz
                        vtmoz
                        0
                        3
                        817

                      • What are the best practices with website redesign & redirects?
                        PatrickDelehanty
                        PatrickDelehanty
                        0
                        2
                        148

                      • SEO Best Practice for a multi-language and multi-country website
                        JarnoNijzing
                        JarnoNijzing
                        0
                        2
                        2.5k

                      • Our Site's Content on a Third Party Site--Best Practices?
                        nicole.healthline
                        nicole.healthline
                        1
                        4
                        269

                      • Is it possible for a multi doctor practice to have the practice's picture displayed in Google's SERP?
                        MiriamEllis
                        MiriamEllis
                        0
                        4
                        463

                      • What are best practices for multi-language seo?
                        petrakraft
                        petrakraft
                        0
                        3
                        1.6k

                      • Don't want to lose page rank, what's the best way to restructure a url other than a 301 redirect?
                        marig
                        marig
                        0
                        6
                        1.0k

                      Get started with Moz Pro!

                      Unlock the power of advanced SEO tools and data-driven insights.

                      Start my free trial
                      Products
                      • Moz Pro
                      • Moz Local
                      • Moz API
                      • Moz Data
                      • STAT
                      • Product Updates
                      Moz Solutions
                      • SMB Solutions
                      • Agency Solutions
                      • Enterprise Solutions
                      • Digital Marketers
                      Free SEO Tools
                      • Domain Authority Checker
                      • Link Explorer
                      • Keyword Explorer
                      • Competitive Research
                      • Brand Authority Checker
                      • Local Citation Checker
                      • MozBar Extension
                      • MozCast
                      Resources
                      • Blog
                      • SEO Learning Center
                      • Help Hub
                      • Beginner's Guide to SEO
                      • How-to Guides
                      • Moz Academy
                      • API Docs
                      About Moz
                      • About
                      • Team
                      • Careers
                      • Contact
                      Why Moz
                      • Case Studies
                      • Testimonials
                      Get Involved
                      • Become an Affiliate
                      • MozCon
                      • Webinars
                      • Practical Marketer Series
                      • MozPod
                      Connect with us

                      Contact the Help team

                      Join our newsletter
                      Moz logo
                      © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                      • Accessibility
                      • Terms of Use
                      • Privacy