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. 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
1.6k
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 May 15, 2015, 11:28 PM

    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 May 16, 2015, 6:06 PM May 16, 2015, 6:06 PM

      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 May 16, 2015, 5:51 PM May 16, 2015, 5:51 PM

        Does cloudflare work on state level?

        N1ghteyes 1 Reply Last reply May 16, 2015, 6:06 PM Reply Quote 0
        • N1ghteyes
          N1ghteyes last edited by May 16, 2015, 5:47 PM May 16, 2015, 5:47 PM

          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 May 16, 2015, 5:51 PM Reply Quote 0
          • Firestarter-SEO
            Firestarter-SEO Subscriber last edited by May 16, 2015, 5:43 PM May 16, 2015, 5:43 PM

            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 May 16, 2015, 4:30 PM May 16, 2015, 4:30 PM

              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 May 16, 2015, 8:40 AM May 16, 2015, 8:40 AM

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

                • Alces

                  Best way to handle Breadcrumbs for Blog Posts in multiple categories?

                  The site in question uses Wordpress. They have a Resources section that is broken into two categories (A or B). Underneath each of these categories is 5 or 6 subcategories. The structure looks like this: /p/main-category-a/subcategory/blog-post-name /p/main-category-b/subcategory/blog-post-name All posts have a main category, but other posts often have multiple subcategories while some posts also fall into both main categories. What would be the easiest or most effective way to auto-populate the breadcrumb based on from where the person reached the blog post? So for example, a way to set Home -> Main Category -> Subcategory 1 as the breadcrumb if they reach it from the Subcategory 1 landing page. Or is this not possible and we should just set the breadcrumb manually based on where we feel it best lives? Thanks.

                  Technical SEO | Sep 9, 2019, 10:13 PM | Alces
                  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 | Mar 15, 2018, 6:01 PM | bhsiao
                  0
                • shoesonline

                  Canonical for duplicate pages in ecommerce site and the product out of stock

                  I’m an SEO for an ecommerce site that sells shoes I have duplicate pages for different colors of the same product (unique URL for each color), Conventionally I have added canonical tags for each page, which direct to a specific product URL My question is what happens when a product which the googlbot is direct to, is out of stock but is still listed in the canonical tag ?

                  Technical SEO | Mar 15, 2016, 12:12 PM | shoesonline
                  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 | Feb 24, 2015, 11:45 PM | richdan
                  0
                • RKanfi

                  Does the use of sliders for text-on-page, effects SEO in any way?

                  The concept of using text sliders in an e-commerce site as a solution to placing SEO text above or in between product and high on ages, seems too good to be true.... or is it? How would a text slider for FAQ or other on-page text done with sliding paragraphs (similar but not this specific code- http://demo.tutorialzine.com/2010/08/dynamic-faq-jquery-yql-google-docs/faq.html) might effect text-on-page SEO. Does Google consider it hidden text? Would there be any other concerns or best practices with this design concept? faq.html

                  Technical SEO | Sep 9, 2012, 10:59 AM | RKanfi
                  0
                • Allstar

                  Location Based Content / Googlebot

                  Our website has local content specialized to specific cities and states. The url structure of this content is as follows: www.root.com/seattle www.root.com/washington When a user comes to a page, we are auto-detecting their IP and sending them directly to the relevant location based page - much the way that Yelp does. Unfortunately, what appears to be occurring is that Google comes in to our site from one of its data centers such as San Jose and is being routed to the San Jose page. When a user does a search for relevant keywords, in the SERPS they are being sent to the location pages that it appears that bots are coming in from. If we turn off the auto geo, we think that Google might crawl our site better, but users would then be show less relevant content on landing. What's the win/win situation here? Also - we also appear to have some odd location/destination pages ranking high in the SERPS. In other words, locations that don't appear to be from one of Google's data center. No idea why this might be happening. Suggestions?

                  Technical SEO | Jul 23, 2012, 6:48 AM | Allstar
                  0
                • kchandler

                  Robots.txt File Redirects to Home Page

                  I've been doing some site analysis for a new SEO client and it has been brought to my attention that their robots.txt file redirects to their homepage. I was wondering: Is there a benfit to setup your robots.txt file to do this? Will this effect how their site will get indexed? Thanks for your response! Kyle Site URL: http://www.radisphere.net/

                  Technical SEO | Mar 18, 2011, 11:01 AM | kchandler
                  0
                • jfkorn

                  Is a redirect based on a session cookie hurting rankings?

                  My clients business is divided in chain stores. All stores are set under the same franchise. There is one domain www.company.com with branches like www.company.com/location1/content and www.company.com/location2/content etc. I've taken care of duplicate content issues with rel="canonical" and duplicate page titles are also not a concern, anymore. Right now the concept is like this: If you visit the site for the first time you get to choose between the locations. Then a cookie is set and once you revisit www.company.com it will redirect you via a php header command to the location stored in your cookie: www.company.com/location1/content. My question is if this might hurt rankings in some kind of way as these aren't permanent redirects with a 301 but rather individual ones, based on your cookie.

                  Technical SEO | Mar 10, 2011, 2:55 PM | jfkorn
                  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
                • 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.