undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • MozCon
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Digital Marketers
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    Let your business shine with Listings AI
    Moz Local

    Let your business shine with Listings AI

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • MozCon

      Save on Early Bird tickets and join us in London or New York City

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Digital Marketers

      Simplify SEO tasks to save time and grow your traffic.

    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

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

  1. Home
  2. SEO Tactics
  3. Intermediate & Advanced SEO
  4. Best practice to redirects based on visitors' detected language

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

Best practice to redirects based on visitors' detected language

Intermediate & Advanced SEO
5
9
26.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • Damiano
    Damiano last edited by May 4, 2011, 10:08 AM

    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
    • Damiano
      Damiano @CoolSEOnStuff last edited by Jun 17, 2011, 4:07 AM Jun 17, 2011, 4:07 AM

      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
      • CoolSEOnStuff
        CoolSEOnStuff last edited by Jun 14, 2011, 7:25 PM Jun 14, 2011, 7:25 PM

        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 Jun 17, 2011, 4:07 AM Reply Quote 0
        • topic:timeago_earlier,about a month
        • Damiano
          Damiano @vheilman last edited by May 5, 2011, 3:55 AM May 5, 2011, 3:55 AM

          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
          • vheilman
            vheilman last edited by May 4, 2011, 1:38 PM May 4, 2011, 1:38 PM

            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 May 5, 2011, 3:55 AM Reply Quote 0
            • vheilman
              vheilman @A_Q last edited by May 4, 2011, 1:24 PM May 4, 2011, 1:24 PM

              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
              • A_Q
                A_Q last edited by May 4, 2011, 1:14 PM May 4, 2011, 1:12 PM

                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 May 4, 2011, 1:24 PM Reply Quote 0
                • vheilman
                  vheilman last edited by May 4, 2011, 11:35 AM May 4, 2011, 11:33 AM

                  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
                  • wissamdandan
                    wissamdandan last edited by May 4, 2011, 10:36 AM May 4, 2011, 10:36 AM

                    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
                    • 1 / 1
                    1 out of 9
                    • First post
                      1/9
                      Last post

                    Got a burning SEO question?

                    Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                    Start my free trial


                    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.

                    • See all categories

                    Related Questions

                    • andyheath

                      Will disallowing URL's in the robots.txt file stop those URL's being indexed by Google

                      I found a lot of duplicate title tags showing in Google Webmaster Tools. When I visited the URL's that these duplicates belonged to, I found that they were just images from a gallery that we didn't particularly want Google to index. There is no benefit to the end user in these image pages being indexed in Google. Our developer has told us that these urls are created by a module and are not "real" pages in the CMS. They would like to add the following to our robots.txt file Disallow: /catalog/product/gallery/ QUESTION: If the these pages are already indexed by Google, will this adjustment to the robots.txt file help to remove the pages from the index? We don't want these pages to be found.

                      Intermediate & Advanced SEO | Apr 28, 2016, 11:05 AM | andyheath
                      0
                    • Charlesfridmanpr

                      I'm a newb, built a website with Wix want to redirect it to a domain I own, but am reading that Wix is bad for this

                      Hi, I am building this site for my boss http://charlesfridmanpr.wix.com/real-estate and am still working on it. I'm getting close to the stage where I want to redirect it to the URL we want to use, but in reading these forums, it says that because all of subpages (?) have a # in them, they will not be read or indexed by google. I am very new to this, and while it may not look like it, the website has taken me quite a while to design.  Is there a way to fix this?  We want to appear high up for a non competitive keyword. Thanks

                      Intermediate & Advanced SEO | Sep 15, 2015, 5:24 PM | Charlesfridmanpr
                      0
                    • Dillman

                      How do I get rel='canonical' to eliminate the trailing slash on my home page??

                      I have been searching high and low. Please help if you can, and thank you if you spend the time reading this. I think this issue may be affecting most pages. SUMMARY: I want to eliminate the trailing slash that is appended to my website. SPECIFIC ISSUE: I want www.threewaystoharems.com to showing up to users and search engines without the trailing slash but try as I might it shows up like www.threewaystoharems.com/ which is the canonical link. WHY?  and I'm concerned my back-links to the link without the trailing slash will not be recognized but most people are going to backlink me without a trailing slash. I don't want to loose linkjuice from the people and the search engines not being in consensus about what my page address is. THINGS I"VE TRIED: (1) I've gone in my wordpress settings under permalinks and tried to specify no trailing slash. I can do this here but not for the home page. (2) I've tried using the SEO by yoast to set the canonical page. This would work if I had a static front page, but my front page is of blog posts and so there is no advanced page settings to set the canonical tag. (3) I'd like to just find the source code of the home page, but because it is CSS, I don't know where to find the reference.  I have gone into the css files of my wordpress theme looking in header and index and everywhere else looking for a specification of what the canonical page is. I am not able to find it. I'm thinking it is actually specified in the .htaccess file. (4) Went into cpanel file manager looking for files that contain Canonical. I only found a file called canonical.php . the only thing that seemed like it was worth changing was changing line 139 from $redirect_url = home_url('/');  to $redirect_url = home_url('');       nothing happened. I'm thinking it is actually specified in the .htaccess file. (5) I have gone through the .htaccess file and put thes 4 lines at the top (didn't redirect or create the proper canonical link) and then at the bottom of the file  (also didn't redirect or create the proper canonical link) :   RewriteEngine on
                      RewriteCond %{HTTP_HOST} ^([a-z.]+)?threewaystoharems.com$ [NC]
                      RewriteCond %{HTTP_HOST} !^www. [NC]
                      RewriteRule .? http://www.%1threewaystoharems.com%{REQUEST_URI} [R=301,L] Please help friends.

                      Intermediate & Advanced SEO | Mar 16, 2014, 11:00 PM | Dillman
                      0
                    • DarinPirkey

                      Best Practices for Moving a Sub-Domain to a Sub-Folder

                      One of my clients is moving their subdomain to a subfolder on their main domain.  (ie.  blog.example.com to example.com/blog) I just wanted to get everyone's thoughts on some best practices for things we should be doing/looking for when making this move.? ie WMT, .htaccess, 301s etc? Thanks.

                      Intermediate & Advanced SEO | Jan 16, 2014, 6:37 PM | DarinPirkey
                      0
                    • co.mc

                      When should you redirect a domain completely?

                      We moved a website over to a new domain name. We used 301 redirects to redirect all the pages individually (around 150 redirects). So my question is, when should we just kill the old site completely and just redirect (forward/point) the old domain over to the new one?

                      Intermediate & Advanced SEO | Jan 9, 2014, 3:17 PM | co.mc
                      0
                    • kking4120

                      What's the best way to redirect categories & paginated pages on a blog?

                      I'm currently re-doing my blog and have a few categories that I'm getting rid of for housecleaning purposes and crawl efficiency. Each of these categories has many pages (some have hundreds). The new blog will also not have new relevant categories to redirect them to (1 or 2 may work). So what is the best place to properly redirect these pages to? And how do I handle the paginated URLs? The only logical place I can think of would be to redirect them to the homepage of the blog, but since there are so many pages, I don't know if that's the best idea. Does anybody have any thoughts?

                      Intermediate & Advanced SEO | Oct 17, 2013, 11:46 AM | kking4120
                      0
                    • Mark_Ch

                      Best Practice For Company/Client Logo Endorsement

                      Article: http://searchengineland.com/homepage-sliders-are-bad-for-seo-usability-163496 I came across the following article and somewhat agree with the authors summary.
                      I find sliders a distraction to B2B users and overall offers no SEO benefits. Scenario
                      As a service provider, over time I have worked with many high profile blue chip comnpanies. As part of my site redesign, I'm looking to show users my client achievements. My initial thoughts are to carry out the following: On the home page I'm looking to incorporate some high profile company logos (similar to http://www.semrush.com) with a hyperlink "more customers" to the right of logo caption. The link will take the user to a dedicated page (www.mydomain.co.uk/customer) showing a comprehensive list of company logos. Questions
                      #1 Is the above practice good or bad.
                      #2 Is there a better way to achieve the above Any other practical advise on user experience, social engagement, website speed, etc would be much appreciated. Thanks Mark

                      Intermediate & Advanced SEO | Oct 11, 2013, 12:25 AM | Mark_Ch
                      0
                    • tomypro

                      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
                      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? /Thomas

                      Intermediate & Advanced SEO | Aug 15, 2012, 6:06 AM | tomypro
                      0

                    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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                    • Accessibility
                    • Terms of Use
                    • Privacy

                    Looks like your connection to Moz was lost, please wait while we try to reconnect.