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. Intermediate & Advanced SEO
    4. 301 redirect for ip address in SERPs

    301 redirect for ip address in SERPs

    Intermediate & Advanced SEO
    4 2 1.3k
    • 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.
    • ChrisHillfd
      ChrisHillfd last edited by

      Hi,

      I've recently had the misfortune of my site's ip address being crawled and indexed by Google, which is causing some duplicate content issues. Due to the nature of the site we're not able to implement a canonical tag to fix this at present.

      Would a 301 redirect do the trick, and if so, could someone point me to what I'd need to add to our .htaccess file?

      Many thanks

      Chris

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

        Here are a few 301 redirects that "might" work on an Apache server

        I would always consider saving the original .htacess file

        just in case these don’t work for you, as you can always resort back

        301 a non-www to your www, as well as redirect your IP address as a 301 to your www.

        RewriteEngine On

        RewriteCond %{HTTP_HOST} .

        RewriteCond %{HTTP_HOST} !^www.domain.com

        RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

        For just IP Redirection Use:

        RewriteCond %{HTTP_HOST} ^12.34.567.890

        RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

        Don’t forget to fill in the areas with your credentials

        ChrisHillfd 1 Reply Last reply Reply Quote 1
        • ChrisHillfd
          ChrisHillfd @SEOExecutive20 last edited by

          Thanks for your help. I'll give that a go and see what happens!

          Cheers,

          Chris

          SEOExecutive20 1 Reply Last reply Reply Quote 0
          • SEOExecutive20
            SEOExecutive20 @ChrisHillfd last edited by

            Anytime! Let me know how it goes for you.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Redirecting an IP address
              Martijn_Scheijbeler
              Martijn_Scheijbeler
              0
              2
              69

            • SEO impact of 301 redirects based on IP addresses from a specific state
              VeteransFirstMarketing
              VeteransFirstMarketing
              0
              5
              662

            • 301 Redirects... Redirect all content at once or in increments?
              Koki.Mourao
              Koki.Mourao
              0
              6
              175

            • IP Address: Ownership Location Versus IP Resolve
              jake372
              jake372
              0
              3
              217

            • How to get head office address appear on SERPS under brand serps?
              MiriamEllis
              MiriamEllis
              0
              8
              263

            • How to use a 301 Redirect when the first 301 Redirect is not the same as what's indexed?
              PatriotOutfitters81
              PatriotOutfitters81
              0
              3
              66

            • SEO friendly way to redirect users based on IP address
              ChristopherM
              ChristopherM
              0
              4
              4.1k

            • Redirects 301
              PedroM
              PedroM
              0
              3
              339

            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