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

    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.

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

    Technical SEO
    4
    7
    1614
    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.
    • Firestarter-SEO
      Firestarter-SEO Subscriber 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
      • 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
        • Firestarter-SEO
          Firestarter-SEO Subscriber @N1ghteyes last edited by

          Does cloudflare work on state level?

          N1ghteyes 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 Subscriber 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
              • 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
                • 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
                  • 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

                  • CitimarineMoz

                    How effective are 301 redirects in passing page rank?

                    301 redirect page rank

                    I have a blog which is ranking well for certain terms, and would like to repurpose it to better explain these terms it is ranking for, including updating the url to the new term the blog will be about. The plan being to 301 redirect the old url to new. In the past, I've done this with other pages, and have actually lost much of the rankings that I had earned on the original URL. What is your take on this? Maybe repurpose blog, but maintain original URL just to be on the safe side? Thanks

                    Technical SEO | | CitimarineMoz
                    0
                  • alstam

                    301 redirect from dynamic url to static page

                    Hi, i want to redirect from this old link http://www.g-store.gr/product_info.php?products_id=1735/ to this one https://www.g-store.gr/golf-toualetas.html I have done several attempts but with no result. I anyone can help i will appreciate. My website runs in an Apache server with cpanel. Thank you

                    Technical SEO | | alstam
                    0
                  • GoMentor

                    Best way to change URL for already ranking pages

                    Hello. I have a lot of pages that I'm optimising. The ones I'm focusing on right now is already ranking, but the URLs could be better (they don't include the keywords right now). However I'm worried that if I change the URLs they will drop in rankings or have to start over. I would of course set up 301 redirect, but is there more I need to do? What is the best way to change URL for already ranking pages?

                    Technical SEO | | GoMentor
                    0
                  • Silviu

                    Removing a large number of unnecessary pages from a site

                    Hi all, I got a big problem with my website. I have a lot of page, duplicate page made from various combinations of selects, and for all this duplicate content we've be hit by a panda update 2 years ago. I don't want to bring new content an all of these pages, about 3.000.000, because most of them are unnecessary. Google indexed all of them (3.000.000), and I want to redirect the pages that I don't need anymore to the most important ones. My question, is there any problem in how google will see this change, because after this it will remain only 5000-6000 relevant pages?

                    Technical SEO | | Silviu
                    0
                  • richdan

                    How do I redirect the Author archive page in Wordpress?

                    If you do a search for my name on Google, the first result is the author archive page of my Wordpress blog. I would like to redirect the author page to my  "about me" page but cannot add a 301 as the author page is created dynamically in Wordpress. Anyone know how I can do this?

                    Technical SEO | | richdan
                    0
                  • Pete4

                    Why is Google Webmaster Tools showing 404 Page Not Found Errors for web pages that don't have anything to do with my site?

                    I am currently working on a small site with approx 50 web pages.  In the crawl error section in WMT Google has highlighted over 10,000 page not found errors for pages that have nothing to do with my site.  Anyone come across this before?

                    Technical SEO | | Pete4
                    0
                  • webmasterles

                    Site disappearing from search for a certain keyword

                    I was wondering if someone has encountered the same problem as me. I was doing some changes on the frontpage of one of my clients' website, especially some redirections, and my site has disappeared from Google for the main keyword on the page. So, if I look for my page on Google, instead of seeing my page first, I no longer see my page, at all. All I've done was a 301 redirection from index.html to the domain name. Now, I changed everything back to how it was before. More precisely, I've done that 2 weeks ago. But, no change in Google. I checked Bing and Yahoo, my site appears first when I search for that specific keyword. Any ideas how long will it take for Google to see that I am not doing anything wrong with redirections? Or any idea at all?

                    Technical SEO | | webmasterles
                    0
                  • mamacassi

                    Internal vs external blog and best way to set up

                    I have a client that has two domians registered - one uses www.keywordaustralia.com the other uses www.keywordaelaide.com He had already bought and used the first domain when he came to me I suggested the second as being worth buying as going for a more local keyword would be more appropriate. Now I have suggested to him that a blog would be a worthy use of the second domain and a way to build links to his site - however I am reading that as all links will be from the same site it wont be worth much in the long run and an internal blog is better as it means updated content on his site. should i use the second domain for blog, or just 301 the second domain to his first domain. Or is it viable to use the second domain as the blog and just set up an rss feed on his page ? Is there a way to have the second domain somehow 'linked' to his first domain with the blog so that google sees them as connected ? NOOBIE o_0

                    Technical SEO | | mamacassi
                    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

                  Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

                  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.