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

                  • tejasbansode

                    Is 301 redirect the only way when using Vanity URLs?

                    We have been using vanity urls for some of our pages. Mostly the pages that have a vanity URL have a long URL length. But now the problem is, the vanity URL is getting displayed on the search engine when the particular keyword related to the page is entered. I checked the google search console, the vanity URL is indexed and the original URL remains unindexed. What should I do? Is adding 301 redirect to the vanity URLs are solution? Since some of vanity URLs are not redirecting to the original. Some of the original pages are not getting traffic. Also, can using canonical tag help?

                    Technical SEO | | tejasbansode
                    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
                  • bhsiao

                    Adding https version of website: how best to redirect

                    If I have 4 versions of my site http://www
                    http://
                    https://www
                    https:// What is the best way to redirect without losing seo positions? i have been mainly using http://www but have recently added my ssl so https works also. I heard at Moz Con that I should get the https working. All of my marketing and ads are going to http://www 301 redirect 3 of them? Which 3? If https is becoming important, should that be my main url? will it hurt my seo to switch? Thank you so much in advance!

                    Technical SEO | | bhsiao
                    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
                  • DA2013

                    How do I find which pages are being deindexed on a large site?

                    Is there an easy way or any way to get a list of all deindexed pages? Thanks for reading!

                    Technical SEO | | DA2013
                    0
                  • annalytical

                    Redirecting root domain to a page based on user login

                    We have our main URL redirecting non-logged in users to a specific page and logged in users are directed to their dashboard when going to the main URL. We find this to be the most user-friendly, however, this is all being picked up as a 302 redirect. I am trying to advise on the ideal way to accomplish this, but I am not having much luck in my search for information. I believe we are going to put a true homepage at the root domain and simply redirect logged in users as usual when they hit the URL, but I'm still concerned this will cause issues with Google and other search engines. Anyone have experience with domains that need to work in this manner? Thank you! Anna

                    Technical SEO | | annalytical
                    0
                  • gossi74

                    Merging several sites into one - best practice

                    I had 2 sites on the web (www.physicseditor.de, www.texutrepacker.com) and decided to move them all under one single domain (www.codeandweb.com) Both sites were ranking very good for several keywords. I not redirected the most important pages from the old domains with a 301 redirect to the new subpages (www.texturepacker.com => www.codeandweb.com/texturepacker) Google still delivers the old domains but the redirect take people directly to the new content. I've already submitted the new site map to google webmaster tools. Pages are already in the index but do not really show up in the search results. How long does it take until google accepts the new domain and delivers the new content in the search results? Was it ok what I did? Or is there some room for improvement? SeoMoz will of course not find any information about the new page since it is not yet directly linked in google. But I can't get ranking information for the "old" pages since SeoMoz tells me that it can't crawl the old domains....

                    Technical SEO | | gossi74
                    0
                  • Weerdboil

                    Delete old site but redirect domain to a new domain and site

                    I just have a quick query and I have a feeling about what the answer is so just wanted to see what you guys thought... Basically I am working on a client site. This client has a few other websites that are divisions of their company. However these divisions/websites are no longer used. They are wanting to delete the websites but redirect the domains to their name main website. They believe this will pass on SEO benefits as these old division sites are old and have a good PR and history. I'm unsure for DEFINITE, which way is correct?

                    Technical SEO | | Weerdboil
                    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.