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
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • 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.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      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.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • 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.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • 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.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • 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. GeoIP - Redirect all but target country

    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.

    GeoIP - Redirect all but target country

    Intermediate & Advanced SEO
    3
    5
    3249
    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.
    • cottamg
      cottamg last edited by

      My client would like to redirect all non UK traffic from their UK site to their main group site.

      I am intending to use a .htaccess redirect, like this:

      RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^GB$
      RewriteRule ^(.*)$ http://www.group.com$1 [R,L]

      I have tested the redirect at it works fine.

      My question is if I put this in place would it have any negative SEO impact on the UK site?

      1 Reply Last reply Reply Quote 0
      • joony2008
        joony2008 @Hannah_Smith last edited by

        Hello, Thanks for this, and this is an old thread but I had a very smilar question to this.

        What do you exactly mean by indexation problems?

        Do you mean the Google refuse to crawl UK site in this example? So they don't index UK webpages? I don't think this make sense? or I am getting a wrong idea.

        I am just wondering where you found this information. I did my homework and SEOmoz ppl talked about "cloaking" video by Matt Cutt and He says GeoIP redirecting is fine? I am no where close to an expert but had to ask this question because I was trying to do the same thing,

        http://www.seomoz.org/q/redirecting-root-domain-to-subdirectory-by-ip-addresses-country-specific

        Thank you!

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

          You're welcome 🙂

          joony2008 1 Reply Last reply Reply Quote 0
          • cottamg
            cottamg @Hannah_Smith last edited by

            Many many thanks Rebecca!

            The quality of this answer makes this years subscription worthwhile, and we are only a month in.

            Must have taken you some time, it is much appreciated.

            Cheers, Gary.

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

              Hi Gary,

              This sort of redirect can cause indexation problems.

              Typically Google crawls from the US -  and as such the bots may only see your US content - no UK content = no UK rankings - so this isn't a solution which I'm keen to recommend.

              If you really need to implement something like this, you could try doing what cheapflights.com do. For example if you visit cheapflights.com from a UK IP they redirect you to this international choice page -

              http://www.cheapflights.com/workers/profile-select.aspx?sref=CFUK&redirect=GeoIP&geoip=GB&cfref=CFUS&spt=Home&rp=/:

              This solution allows the bots to crawl both versions of the sites, plus it allows users to select which version of the site they wish to see.

              You might also consider one of the following -

              a) Don't do any IP redirection, but upweight the links to the international sites so that there is a clear route for users to find the right version of the site.

              b) Use IP detection to show a JavaScript overlay suggesting non-UK users might want to visit the main group site - but don't actually redirect them.

              I hope this helps 🙂

              Hannah

              cottamg 1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                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

              • brianvest

                301 redirects Ruby on Rails

                Can anyone point me to the best way to implement 301 redirects on a Ruby on Rails website?

                Intermediate & Advanced SEO | | brianvest
                0
              • TomNYC

                Redirecting to a new domain... a second time

                Hi all, I help run a website for a history-themed podcast and we just moved it to its second domain in 7 years. We've had very good SEO up until last week, and I'm wondering if I screwed up the way I redirected the domains. It's like this: Originally the site was hosted at "first.com", and it acquired inbound links. However, we then started to host the site on blogger, so we... Redirected the site to "second.blogspot.com". (Thus, 1 --> 2) It stayed here for about 7 years and got lots of traffic. Two weeks ago we moved it off of blogger and into Wordpress, so we 301 redirected everything to... third.com. (Thus, 1 --> 2 --> 3) The redirects worked, and when we Google individual posts, we are now seeing them in Google's index at the new URL. My question: What about the 1--> 2 redirect? There are still lots of links pointing to "first.com". Last week I went into my GoDaddy settings and changed the first redirect, so that first.com now points to third.com. (Thus 1 --> 3, and 2-->3) I was correct in doing that, right? The drop in Google traffic I've seen this past week makes me think that maybe I screwed something up. Should we have kept 1 --> 2 --> 3? (Again, now we have 1-->3 and 2-->3) Thanks for any insights on this! Tom

                Intermediate & Advanced SEO | | TomNYC
                1
              • Chris_Bishop

                301 redirect subdirectory to new domain

                I'm planning on using 301 redirects to spin out a subdirectory of my current website to be its own separate domain. For instance, I currently have a website www.website.com and my writers write tech news at www.website.com/news. Now I want to 301 redirect www.website.com/news to www.technews.com. Will this have any negative impact on SEO? What are some steps that I can take to minimize these impacts?

                Intermediate & Advanced SEO | | Chris_Bishop
                1
              • g-s-m

                For how long does Google honor a 302 redirect?

                Greetings!  I would love some recent experiences to support our experience which is +/- 1 year old on this question. Based on our experiences around a year ago, I believe that Google will only honor a 302 temporary redirect for a relatively short period - perhaps up to a month - and then it will begin treating the redirect as a 301 redirect and will remove the old page from the index.  Have others seen this?  Is there an update on what the max "safe" period to have a 302 in place could be? We have a domain that is soon to experience about 3 months of "downtime" with no content on it, but the content will be back after that time.  Ideally we would 302 redirect the pages elsewhere just for that downtime period.  However, I don't want to do a 302 redirect if there is a risk that the pages will lose all of their accumulated authority and indexing.  Basically, is there any safe way to just put the domain on ice for a few months? Please share recent experience only. Thanks for your insights!

                Intermediate & Advanced SEO | | g-s-m
                0
              • LosNomads

                301 redirection pointing to noindexed pages

                I have rather an unusual situation where a recently launched affiliate site does not have any unique content as its all syndicated content. For that reason we are currently using the noindex,nofollow meta tags to keep the pages out of the search engines index until we create unique content for the pages. The problem is that due to a very tight timeframe with rebranding, we are looking at 301 redirecting (on a page to page basis) another high authority legacy domain to this new site before we have had a chance to add unique content to it and remove the noindex,nofollow tags. I would assume that any link authority normally passed through the 301 would be lost in this scenario but Im uncertain of what the broader impact might be. Has anyone dealt with a similar scenario? I know this scenario is not ideal and I would rather wait until the unique content is up and noindex tags are removed before launching the 301 redirect of the legacy domain but there are a number of competing priorities at play outside of SEO.

                Intermediate & Advanced SEO | | LosNomads
                0
              • Davenport-Tractor

                Redirecting non www site

                Hello Ladies and Gentlemen. I 100% agree with the redirecting of the non www domain name. After all we see so many times, especially in MOZ how the two different domains contain different links, different DA and of course different PA. So I have posed the question to our IT company, "How would we go about redirecting our non www domain to the www version?", "Where would we do that?", " we cant do the redirect on our webserver because the website is listed as an IP address, not a domain name, so would we do the redirect somewhere at GoDaddy?" who is currently maintain our DNS record So here is the response from IT:  " I would setup a CNAME record in DNS (GoDaddy), such that no matter if you go to the bare domain, or the www, you end up in the same place. As for SEO, having a 301 redirect for your bare domain isn't necessary, because both the bare domain and the www are the same domain.  301 is a redirect for "permanently moved" and is common when you change domain names.  Using the bare domain or the www are NOT DIFFERENT DOMAINS, so the 301 would not be accurate, and you'd be telling engines you've moved, when you haven't - which may negatively impact your rank. It sounds to me that IT is NOT recommending the redirect. How can this be? Or are we talking about two different things? Will the redirect cause the melt down as the IT company suggests? Or do they nut understand SEO?

                Intermediate & Advanced SEO | | Davenport-Tractor
                0
              • NakulGoyal

                Wildcard Redirects & Canonical Tags

                I have an interesting situation. Current URLs Example1: www.domain.com/red-widgets-cid-1234.html
                www.domain.com/red-widgets-cid-1234-1.html
                www.domain.com/red-widgets-cid-1234-1-1.html Canonical on All Above URLs:
                www.domain.com/red-widgets-cid-1234.html New URL:
                www.domain.com/red-widgets-cid-4567.html Current URLs Example2: www.domain.com/red-widgets-cid-1234+10.html
                www.domain.com/red-widgets-cid-1234+10-1.html
                www.domain.com/red-widgets-cid-1234+10-1-1.html Canonical on All Above URLs:
                www.domain.com/red-widgets-cid-1234+10.html New URL:
                www.domain.com/red-widgets-cid-6789.html Current URLs Example3: www.domain.com/red-widgets-cid-1234+10+5.html
                www.domain.com/red-widgets-cid-1234+10+5-1.html
                www.domain.com/red-widgets-cid-1234+10+5-1-1.html Canonical on All Above URLs:
                www.domain.com/red-widgets-cid-1234+10+5.html New URL:
                www.domain.com/american-red-widgets-cid-6789+5.html I want to make sure all variations of the above URL redirect to the new URLs.  However, as you see in Example 3, we are dealing with variables that are passed on. (+5 in this case). Question 1: What wildcard 301 redirect / regular expression can I use to tackle these ? Question 2: If we redirect www.domain.com/red-widgets-cid-1234+10+5.html to www.domain.com/red-widgets-cid-6789+5.html and www.domain.com/red-widgets-cid-6789+5.html contains the canonical tag www.domain.com/american-red-widgets-cid-6789+5.html, any concerns or red flags here ?

                Intermediate & Advanced SEO | | NakulGoyal
                0
              • AdeLewis

                How long should a domain redirect take?

                Hi, I know that this is a 'How long is a piece of string?' type question but at what point should the ranking value of site A pass over to site B following a domain 301 redirect? I have shifted a domain over to a new URL, same hosting server, same IP address. I haven't made any URL changes or any content changes other than to change the site logo to match the new domain name. Domain B is basically an exact clone of domain A. I have redirected Domain A to domain B using the following line at the top of the .htaccess file:- Redirect 301 / http://www.newdomain.com/ I have submitted a sitemap for the new domain via google webmaster tools. It looks like the original domain as been completely indexed by google following the redirect as all rankings have been dropped from the results and there are no results for a site:olddomain.com search. Surely the rankings should have switched over at this point? Any help would be much appreciated.
                Ade.

                Intermediate & Advanced SEO | | AdeLewis
                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
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority 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.