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. 301 Redirects

    301 Redirects

    Technical SEO Issues
    3 3 258
    • 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.
    • healthpointeseo
      healthpointeseo last edited by

      Hi,

      We have migrated to a new domain name and I wrote my redirects as follows:

      Redirect 301 / http://www.healthpointe.net

      Redirect 301 /urgent_care_locations.shtml http://www.healthpointe.net/healthpointe-locations/

      Redirect 301 /locations.shtml http://www.healthpointe.net/healthpointe-locations/

      Redirect 301 /career_client_relations_rep.shtml http://www.healthpointe.net/careers/

      My issue is that when I include the first redirect, which is to the main page of the website that the other redirects stop working. Any idea what the problem could be?

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

        It would have been allot easier if you had used the same url names as the old site.

        If there is a way for you to change your url slugs to the old ones you can use this simple bit of code in the .htaccess file to redirect all old urls to the new one:

        RewriteEngine on
        RewriteCond %{HTTP_HOST} !^www.newdomain.co.uk
        RewriteRule (.*) http://www.newdomain.co.uk/$1 [R=301,L]

        My guess that it isn't working would be that maybe "/" isn't the original home page of your old site? Do you have a "index.html"or similar and are using a .htaccess rule in your old site to determine what the root page should be?

        Maybe your .htaccess file should look like this:

        Redirect 301 /index.html http://www.healthpointe.net

        Don't forget to tell Google webmaster tools that you have changed the address of the website - https://support.google.com/webmasters/answer/83106?hl=en

        1 Reply Last reply Reply Quote 1
        • TheeDigital
          TheeDigital last edited by

          It's failing because of the order. With Redirect 301 / http://www.healthpointe.net first, all other pages that were after / will not work. Also, going to David's answer, redirecting a /index.html is a special case, and there are a few ways around it such as using DirectoryIndex index.html at the top of the file or with a rewrite condition such as:

          RewriteCond %{THE_REQUEST} ^./index.htmlRewriteRule ^(.)index.html$ http://www.domain.com/$1 [R=301,L]

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • To 301 or not to 301?
            iHasco
            iHasco
            1
            4
            70

          • 301 redirect after penalty to domain which currently 301 to the penalised domain
            evolvingSEO
            evolvingSEO
            0
            4
            305

          • Redirect a 301 Redirect
            RedCaffeine
            RedCaffeine
            0
            5
            98

          • 301 Redirect
            KaneJamison
            KaneJamison
            0
            8
            408

          • To 301 redirect or not to 301 redirect? duplicate content problem www.domain.com and www.domain.com/en/
            Chris-CA
            Chris-CA
            0
            5
            456

          • Google Webmaster redirect vs 301 redirect
            lavellester
            lavellester
            0
            2
            493

          • 301 Redirects
            KT684
            KT684
            0
            5
            711

          • 301 redirect
            Jeepster
            Jeepster
            0
            18
            2.7k

          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