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. 301 redirect not working

    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.

    301 redirect not working

    Technical SEO
    3
    12
    5937
    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.
    • twotd
      twotd last edited by

      Hi there! I have recently moved a domain that has been indexed by google and setup redirects so that it forwards to the new domain. It seems like the only redirect that actually is working is the canonical and main domain but every other page and or page nested within a folder are not working. Here is an example of some of the redirects. Am I doing this wrong? It seems to be going to the new domain but can't find the actual pages....

      RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} !agoodsweep.com$ [NC]
      RewriteRule ^(.*)$ http://agoodsweep.com/$1 [L,R=301]
      redirect 301 woodstoveservicerepair.html http://agoodsweep.com/woodstoveservicerepair/
      redirect 301 /westchesterchimney.html http://agoodsweep.com/west-chester-chimney/

      Thanks in advance for any help!!

      1 Reply Last reply Reply Quote 0
      • BlueprintMarketing
        BlueprintMarketing @twotd last edited by

        Great news there is a plugin you might like http://wordpress.org/extend/plugins/redirection/

        ps I would still use a maged Wordpress host they will speed up your site and keep it safe.

        Happy it is fixed

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

          PS all your links point to www.antrimscomplete.com

          not antrimscomplete.com

          1 Reply Last reply Reply Quote 0
          • BlueprintMarketing
            BlueprintMarketing @twotd last edited by

            Sorry I just spent 45 min and went to post the site made me login it did not post

            i will have more time later but do NOT tell google to devalue  HTML links

            Make a redirect with links shown

            http://www.htaccessredirect.co.uk/

            http://yoast.com/change-wordpress-permalink-structure/

            http://www.webconfs.com/htaccess-redirect-generator.php

            http://www.internetofficer.com/seo-tool/redirect-check/

            http://www.webconfs.com/how-to-redirect-a-webpage.php

            If moving your domain this is a good time to use a Wordpress only host use Zippykid , WPengine, Pagely, Web Synthesis or PressLabs Zippykid gives you the most for the moneyhttps://www.zippykid.com/pricing/they are great and will move you and fix this for you. https://www.zippykid.com/resources/kb/pre-sales-faq/can-you-migrate-my-website-for-me/This is how to move to there hosting your selfhttps://www.zippykid.com/resources/kb/getting-started/migrate-your-wordpress-website-to-zippykid/if not use this infohttp://robcubbon.com/moving-wordpress-site-to-new-domain/

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

              read a bunch of those articles and saw the video w/matt cutts...

              i have gone into google webmaster tools and have both sites. I told google to redirect antrimscomplete.com to a goodsweep.com. I also simplified the htaccess :

              Redirect 301 /http://agoodsweep.com/
              redirect 301 /index.html http://agoodsweep.com/
              redirect 301 /woodstoveservicerepair.html http://agoodsweep.com/woodstoveservicerepair/
              and on and on...still the sitelinks in google get 404's. Looked in the host ftp panel to make sure it was reading it - it was. So then I just figured that if i redirect those links in agoodsweep (the new url) to the correct page, it might work.

              It worked! Thanks for all the help - much appreciated!! Now i have to do a bunch of redirects in the wordpress simple redirects plugin.

              BlueprintMarketing 1 Reply Last reply Reply Quote 0
              • twotd
                twotd @BlueprintMarketing last edited by

                hi Thomas - I did clear my cache and history and used separate browsers but do not see that it is working. I will check out the screaming frog!the old site at antrimscomplete.com has been a wordpress site for years now. I guess that the developer of that site left all the html pages up and then realized the problem and put in redirects. So this site has been sitting for a few years  as-is. The owner wants to use a different domain name and wants a different look. I am trying to clean up the mess! I want it to be in wordpress because he uses it as a cms. I guess google indexed a hodge-podge of links, some of which are some of those html pages. Do you suggest going into google webmaster tools and demote the sitelink url's that are the old pages? Does google then use other pages to fill the slots?

                BlueprintMarketing 1 Reply Last reply Reply Quote 0
                • BlueprintMarketing
                  BlueprintMarketing @twotd last edited by

                  you have some serious problems that site just so you know. I will look at your inbound links a lot of them are very  spamy.

                  Why would you take an existing HTML website and convert it into WordPress out of curiosity?

                  I'm not saying there aren't advantages toward press I love WordPress for it much to HTML however if you're going to do a web project like that you and want to start with a clean slate yours has anchor text stating that the website is going to be turned from HTML to WordPress that's not good.

                  I would strongly consider having somebody like Joost audit the site and then fix it. Or simply have a developer pull the good code. The stylesheet will tell the website will look along with CSS with that start you can• with a fresh and get it right

                  twotd 1 Reply Last reply Reply Quote 0
                  • BlueprintMarketing
                    BlueprintMarketing @twotd last edited by

                    I am so sorry this is taking so long. Let me somebody that is sure to know

                    It IS fine it  redirects to http://agoodsweep.com/ no www

                    if you want to use the www. you must swap what you have up there.

                    use this to find the problem Use the link below to find any big problems in most websites. Change your browser or clean out your cash or reset your browser entirely because it is functioning correctly now

                    http://www.screamingfrog.co.uk/seo-spider/

                    http://www.searchenginejournal.com/how-to-avoid-seo-disaster-during-a-website-redesign/42824/

                    http://www.searchenginejournal.com/why-and-an-easy-way-to-set-up-a-301-redirect-on-your-blog/36752/

                    http://www.searchenginejournal.com/seo-friendly-url-structure/4556/

                    http://www.searchenginejournal.com/10-ways-coding-can-help-your-seo/45402/

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

                      thanks for all the input! I did adjust the htaccess to Method 1, but still it is not working correctly. Here is what i did:

                      Options +FollowSymlinks
                      RewriteEngine On
                      RewriteCond %{HTTP_HOST} ^antrimscomplete.com [NC]
                      RewriteRule ^(.)$ http://agoodsweep.com/$1 [L,R=301]
                      RewriteCond %{HTTP_HOST} ^www.antrimscomplete.com [NC]
                      RewriteRule ^(.
                      )$ http://agoodsweep.com/$1 [L,R=301]

                      The old site was originally html and then they made it into a wordpress but kept all the html pages up and active with a few redirects here and there. My client wants a new domain name and eventually a different design, so i have started the process by moving the old domain and all of it's content to the new domain.

                      When you google antrims complete, google has added some site links and here is where things go south - it seems that the pages follow to the new domain but fall short of going to the new page. For example:

                      google points to "our services" page and it redirects to: http://agoodsweep.com/ourservices.html

                      in the htaccess i have: redirect 301 /ourservices.html http://agoodsweep.com/our-services/

                      it's weird because google any thoughts??

                      BlueprintMarketing 2 Replies Last reply Reply Quote 0
                      • BlueprintMarketing
                        BlueprintMarketing last edited by

                        http://www.seomoz.org/learn-seo/redirection

                        http://301redirects.net/redirect-old-domain-to-new-website.php

                        http://website-tools.net/google-keyword/word/apache+redirect+domain

                        http://support.google.com/webmasters/bin/answer.py?hl=en&answer=93633

                        Redirect an Old Domain to your New Website

                        How to instructions using a 301 redirect and mod_rewrite

                        Simply enter the following code into your .htaccess file (changing the addresses in the examples below as needed) and save the changes. If there are several individual pages which have moved, just repeat as neccesary. Not sure how to access or change or .htaccess file. Read our .htaccess guide here.

                        Method 1:

                        Options +FollowSymlinks 
                        RewriteEngine On
                        RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
                        RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

                        RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
                        RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

                        Method 2:

                        Options +FollowSymlinks 
                        RewriteEngine On
                        RewriteCond %{HTTP_HOST} \olddomain.com$
                        RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]

                        Method 3:

                        Options +FollowSymLinks
                        RewriteEngine on
                        RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

                        Method 4:

                        Redirect 301 / http://www.newdomain.com/

                        Benefits of redirecting traffic from your old domain

                        • Don't lose website traffic! Ensure all visitors coming through to your old domain are instantly redirected through to your new address, rather than being presented with a an ugly error 404 which destroys trust in your website and perceived credibility. This means that customers who have already bookmarked your site, or memorised your web address can continue to have access seamlessly. Still have business cards or publications advertising your old website address or domain? This is not an issue with a properly setup 301 redirect.
                        • Keep the Google bot happy! When a website or domain returns an error 404 (page not found) this tells Google that your website no longer resides at this address, and Google therefore promptly removes all of your web listings from it's search engine index, meaning all your SEO efforts to raise search engine ranks will have been wasted. Instead, by properly setting up a 301 redirect for your domain name, this tells Google (and other search engines) that your website has changed address, and Google then therefore updates it's index to reflect this change of address (while preserving your rankings). Also very important to note, is that Google then recognises all inbound links pointing through to your old website and attributes these 'votes' towards your new website, transferring almost all of your Google Pagerank and other signals accross to your new site, and assisting in preserving your sites reputation.
                        1 Reply Last reply Reply Quote 0
                        • BlueprintMarketing
                          BlueprintMarketing last edited by

                          Would you do me a favor and explained exactly what you are using WordPress?

                          Can you give me both domains without folders?

                          I will get you the right info. I also need to know are you using lightspeed, Apache what you using?

                          sincerely,

                          Tom

                          1 Reply Last reply Reply Quote 0
                          • Mike.Goracke
                            Mike.Goracke last edited by

                            I am confused. I am no .htaccess expert; however, I think you should have your old domain in the condition and the rule should have your new domain... like this maybe?

                            RewriteEngine On
                            RewriteBase /
                            RewriteCond %{HTTP_HOST} !antrimscomplete.com$ [NC]
                            RewriteRule ^(.*)$ http://agoodsweep.com/$1 [L,R=301]

                            Mike

                            1 Reply Last reply Reply Quote 0
                            • 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
                            • iQi

                              Google is still indexing the old domain a year after 301 redirects are put in place

                              Hi there, You might have experienced this before but for me this is the first. A client of mine moved from domain A (www.domainA.com) to domain B (www.domainB.com). 301 redirects are all in place for over a year. But the old domain is still showing in Google when you search for "site:domainA.com" The HTTP Header check shows this result for the URL https://www.domainA.com/company/cookie-policy.aspx HTTP/1.1 301 Moved Permanently => 
                              Cache-Control => private
                              Content-Length => 174
                              Content-Type => text/html; charset=utf-8
                              Location => https://www.domain_B_.com/legal/cookie-policy
                              Server => Microsoft-IIS/10.0
                              X-AspNetMvc-Version => 5.2
                              X-AspNet-Version => 4.0.30319
                              X-Powered-By => ASP.NET
                              Date => Fri, 15 Mar 2019 12:01:33 GMT
                              Connection => close Does the redirect look wrong? The change of address request was made on Google Console when the website was moved over a year ago. Edit: Checked the domainA.com on bing and it seems that its not indexed, and replaced with domainB.com, which is the right. Just Google is indexing the old domain! Please let me know your thoughts on why this is happening. Best,

                              Technical SEO | | iQi
                              0
                            • wcksmith1

                              Proper 301 redirect code for http to https

                              I see lots of suggestions on the web for forwarding http to https.  I've got several existing sites that want to take advantage of the SSL boost for SEO (however slight) and I don't want to lose SEO placements in the process.  I can force all pages to be viewed through the SSL - that's no problem.  But for SEO reasons, do I need to do a 301 redirect line of code for every page in the site to the new "https" version?  Or is there a way to catch all with one line of code that Google, etc. will recognize & honor?

                              Technical SEO | | wcksmith1
                              0
                            • SDSLaw

                              Questions about the Sandbox and 301 Redirects

                              Does the sandbox still exist?  What if you have a brand new URL and do a 301 redirect from another website because the name of the service business changed? Thanks for any insight and help.

                              Technical SEO | | SDSLaw
                              0
                            • bimmer540

                              A script to automatically write 301 redirect rules to htaccess?

                              I was wondering if anyone could help provide some resources on how to automatically write 301 redirect rules to htaccess.  Allow me to explain... I'm building a new website and the primary users are businesses.  They have their own profile pages on the site. The URL is based off of their Company Name. In the event that they decided to change their name... reasons being, perhaps they mispelled it the first time, or they're removing LLC or adding Inc, I want to also change the URL and redirect the old URL to the new URL. Since the URL is based off of their Company Name, making a change to the company name would make a change to the URL.  I know it doesn't have to work this way, but for our purpose this works best. In case the old URL had any links to it, I wanted to see if there was an way to automatically update an htaccess file with a 301 redirect from the old URL to the new one. Could anyone point me in the right direction of how to do this?  Perhaps a sample script.  I've done a lot of searches on Google and can't seem to find anything. e.g. Original:
                              Name:  XYZ Widgets
                              URL:  website.com/xyz-widgets New - business changes their company name in their profile:
                              Name:  XYZ Widgets, Inc.
                              URL:  website.com/xyz-widgets-inc Upon the user saving the changes in their profile, I'd like to write a 301 redirect to an htaccess file:
                              Redirect 301 /xyz-widgets http://www.website.com/xyz-widgets-inc I know how to manually write redirects and I've got a pretty smart web developer.  We've just never triggered a script to automatically write to an htaccess file before. Is this possible?  Any resources are appreciated.  Any security risks? Thanks!

                              Technical SEO | | bimmer540
                              0
                            • CommercePundit

                              Does it really matter to maintain 301 redirect after de-indexing of old URLs?

                              Today, I was reading latest blog post on SEOmoz blog about. Uncrawled 301s - A Quick Fix for When Relaunches Go Too Well This is very interesting study about 301 & How it useful to maintain traffic. I'm working on eCommerce website and I have done similar stuff on my website. I have big confusion to manage 301 redirect. My website generates new URLs due to following actions. Re-write dynamic URLs. Re-launch entire website on different eCommerce platform. [osCommerce to Magento Commerce] Re-name category. Trasfer one product from one category to another category. I'm managing my 301 redirect with old practice. Excel sheet data from Google webmaster tools and set specific new URLs for redirect. Hoooo... Now, I have 8.5K redirect in htaccess... And, I'm thinking it's too much. Can we remove old 301 redirect from htaccess or not? This is big question for me. Because, all pages are not hyperlink on external website. Google have just de-indexed old URLs and indexed new URLs. So, Is it require to maintain 301 redirect after Google process?

                              Technical SEO | | CommercePundit
                              0
                            • pbrothers24

                              How many jumps between 301 redirects is acceptable?

                              For example, I have a page A that should be redirected to page D, but instead A redirects to B, B redirects to C and C redirects to D. It's something I came across and wondering if its worth the dev time to change it. Thanks!

                              Technical SEO | | pbrothers24
                              0
                            • sboelter

                              Multiple Domains, Same IP address, redirecting to preferred domain (301) -site is still indexed under wrong domains

                              Due to acquisitions over time and the merging of many microsites into one major site, we currently have 20+ TLD's  pointing to the same IP address as our "preferred domain:"  for our consolidated website http://goo.gl/gH33w. They are all set up as 301 redirects on apache - including both the www and non www versions. When we launched this consolidated website, (April 2010) we accidentally left the settings of our site open to accept any of our domains on the same IP.  This was later fixed but unfortunately Google indexed our site under multiple of these URL's (ignoring the redirects) using the same content from our main website but swapping out the domain.  We added some additional redirects on apache to redirect these individual pages pages indexed under the wrong domain to the same page under our main domain http://goo.gl/gH33w.  This seemed to help resolve the issue and moved hundreds of pages off the index.  However, in December of 2010 we made significant changes in our external dns for our ip addresses and now since December, we see pages indexed under these redirecting domains on the rise again. If you do a search query of : site:laboratoryid.com you will see a few hundred examples of pages indexed under the wrong domain.  When you click on the link, it does redirect to the same page but under the preferred domain.  So the redirect is working and has been confirmed as 301.  But for some reason Google continues to crawl our site and index under this incorrect domains.  Why is this? Is there a setting we are missing?   These domain level and page level redirects should be decreasing the pages being indexed under the wrong domain but it appears it is doing the reverse. All of these old domains currently point to our production IP address where are preferred domain is also pointing.  Could this be the issue? None of the pages indexed today are from the old version of these sites. They only seem to be the new content from the new site but not under the preferred domain. Any insight would be much appreciated because we have tried many things without success to get this resolved.

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