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. Technical SEO Issues
    4. What is the best way to redirect visitors to certain pages of your site based on their location?

    What is the best way to redirect visitors to certain pages of your site based on their location?

    Technical SEO Issues
    7 4 482
    • 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.
    • Firestarter-SEO
      Firestarter-SEO last edited by

      One website I manage wants to redirect users to state specific pages based on their location. What is the best way to accomplish this?

      For example a user enters the through site.com but they are in Colorado so we want to direct them to site.com/colorado.

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

        I can't give you a technical answer. But, from what I understand, you are best off "suggesting" what page they should be redirected to, as opposed to automatically re-directing them. (but Ill stand corrected).

        1 Reply Last reply Reply Quote 2
        • PatrickDelehanty
          PatrickDelehanty last edited by

          Hi there

          Yes, based on the location and their IP, you can redirect users to the proper webpage they are supposed to see.

          I will reference a great answer from Dirk about this that you can read here. I learned a lot from this, as my answer in the thread is obviously wrong.

          Another source Dirk references is this blog post from Matt Cutts - check it out.

          Hope this all helps! Good luck!

          1 Reply Last reply Reply Quote 1
          • Firestarter-SEO
            Firestarter-SEO last edited by

            Blitzna10, I agree that we should suggest a page rather than forward them to the page we "think" they should go to. However, I have been out voted ;(.

            If we have to forward users to a state specific page, what is the best method to do so? A 301, 302, JS redirect, Some other technology I am unaware of?

            Currently we are using a 302.

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

              There are a number of solutions, perhaps the easiest and best solution is to add Cloudflare to your site, and take a look at this blog:

              http://netjunky.net/redirect-web-traffic-based-on-country-origin/

              (this assumes your website runs on PHP)

              Firestarter-SEO 1 Reply Last reply Reply Quote 0
              • Firestarter-SEO
                Firestarter-SEO @N1ghteyes last edited by

                Does cloudflare work on state level?

                N1ghteyes 1 Reply Last reply Reply Quote 0
                • N1ghteyes
                  N1ghteyes @Firestarter-SEO last edited by

                  Thats a good point actually, being UK based, i tend to forget States in the US is how you're likely to do location redirects (that and i read Colorado as Canada... my bad).

                  The short answer i think is not directly. You could use the users IP address and something called mode_geoip in order to handle the redirects, it takes a bit more configuration and setup though.

                  Im seeing lots about redirecting on country, not all that much on redirecting on state, but a good starting point is perhaps this Stackoverflow thread. It's probably something you'll need to ask a developer to do.

                  http://stackoverflow.com/questions/9838344/how-to-redirect-domain-according-to-country-ip-address

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • Hi, we are wanting to test a new version of one particular page on our website. What's the best way to run a test for a week without harming rankings. Do we use a 302 redirect or direct 100% of traffic using a tool like Optimizely?
                    WebElaine
                    WebElaine
                    0
                    2
                    33

                  • Best way to handle URLs of the to-be-translated pages on a multilingual site
                    Lomar
                    Lomar
                    0
                    3
                    52

                  • Test site got indexed in Google - What's the best way of getting the pages removed from the SERP's?
                    Yarden_Uitvaartorganisatie
                    Yarden_Uitvaartorganisatie
                    0
                    5
                    1.3k

                  • If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect?
                    Booj
                    Booj
                    0
                    4
                    113

                  • My beta site (beta.website.com) has been inadvertently indexed. Its cached pages are taking traffic away from our real website (website.com). Should I just "NO INDEX" the entire beta site and if so, what's the best way to do this? Please advise.
                    Vuly
                    Vuly
                    0
                    5
                    1.6k

                  • Best practice for eCommerce site migration, should I 301 redirect or match URLs on new site
                    Jinx14678
                    Jinx14678
                    0
                    4
                    1.2k

                  • I'm redesigning a website which will have a new URL format. What's the best way to redirect all the old URLs to the new ones? Is there an automated, fast way to do this?
                    GregFindley.co.uk
                    GregFindley.co.uk
                    0
                    2
                    303

                  • Redirect from old wordpress site to new php site? Best approach
                    Vahe.Arabian
                    Vahe.Arabian
                    0
                    7
                    844

                  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