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
    • 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.

    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
    • 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. We have set up 301 redirects for pages from an old domain, but they aren't working and we are having duplicate content problems - Can you help?

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.

We have set up 301 redirects for pages from an old domain, but they aren't working and we are having duplicate content problems - Can you help?

Technical SEO
3
11
3.8k
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.
  • danatanseo
    danatanseo last edited by Aug 13, 2012, 7:12 PM

    We have several old domains. One is http://www.ccisound.com  - Our "real" site is http://www.ccisolutions.com  The 301 redirect from the old domain to the new domain works. However, the 301-redirects for interior pages, like:

    http://www.ccisolund.com/StoreFront/category/cd-duplicators  do not work. This URL should redirect to http://www.ccisolutions.com/StoreFront/category/cd-duplicators  but as you can see it does not.

    Our IT director supplied me with this code from the HT Access file in hopes that someone can help point us in the right direction and suggest how we might fix the problem:

    RewriteCond%{HTTP_HOST} ccisound.com$ [NC]

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

    Any ideas on why the 301 redirect isn't happening? Thanks all!

    1 Reply Last reply Reply Quote 0
    • cprasad
      cprasad @danatanseo last edited by Aug 14, 2012, 8:52 PM Aug 14, 2012, 8:52 PM

      Yes, That is the best thing you can do. Because seems there have some other issues in configs. And we can not see from here about your all the configs. Anyway the codes we have given you will successfully work once you solve your other problems.

      Best Regards

      Prasad

      1 Reply Last reply Reply Quote 1
      • danatanseo
        danatanseo @cprasad last edited by Aug 14, 2012, 8:45 PM Aug 14, 2012, 8:45 PM

        Thanks Prasad for all your help. And thank you to Ersin also. We have solved the problem. Apparently, our URL re-write at the TomCat level was taking precedence over the .htaccess file. Once our IT director added the appropriate redirect for these domain pages into the URL re-write file, the problem was fixed and those pages now render with a 301-redirect to the correct page one the correct domain. I have encouraged him to write a blog post about this and put it here because there was very little documentation online about TomCat redirects tasking precedence over an .htaccess file.

        1 Reply Last reply Reply Quote 0
        • danatanseo
          danatanseo @cprasad last edited by Aug 14, 2012, 6:36 PM Aug 14, 2012, 6:36 PM

          Thanks Prasad,

          We tried your suggestion because there was a lot of stuff [1220 lines of code] in our .htaccess file. We stripped everything out except your code, and still had the same problem. Our IT director is wondering if perhaps there is a conflict between the .htaccess file that operates at the Apache level and the URL rewirte file which operates at the TomCat level. He is wondering, does one of them take precedence over the other? In other words, could our URL re-write file be causing the redirects in the .htaccess file to not work properly?

          I am thinking maybe we need to hire someone to look at the code in both files in order to figure out where and why we are having a conflict?

          Dana

          cprasad 1 Reply Last reply Aug 14, 2012, 8:52 PM Reply Quote 0
          • cprasad
            cprasad last edited by Aug 14, 2012, 8:46 PM Aug 14, 2012, 2:47 PM

            Hi,

            I think you are doing so many mistakes. First take out all the other codes from your .htaccess file. Then copy only one code from me or from Ersin. While you have some other codes related to this domains redirection there may have conflicts. And your current code work for your root domains mean your .htaccess redirection is working. The problem is you have not used it correctly.

            danatanseo 2 Replies Last reply Aug 14, 2012, 8:45 PM Reply Quote 1
            • danatanseo
              danatanseo @danatanseo last edited by Aug 14, 2012, 12:16 PM Aug 14, 2012, 12:16 PM

              Thanks to both Ersin and Prasad. I appreciate your efforts to help very much. My IT director tried both versions of code without success. Here is exactly what he wrote:

              " I tried the suggestions without success. I even moved the ccisound
              redirects to the top of the file thinking that some other redirect was grabbing
              it first, But no go, same results. Top level redirected, lower level not."

              Any suggestions as to why neither code succeeded at creating a "catch all." ?

              1 Reply Last reply Reply Quote 0
              • ersaky
                ersaky @danatanseo last edited by Aug 13, 2012, 9:49 PM Aug 13, 2012, 9:49 PM

                cprasad's and my purpose are same, so our responses will work. But just some diffrences;

                "<ifmodule mod_rewrite.c="">" line checks wheter Apache's rewrite module is activated or not. If it is then it runs the code after that. The second one is that my rewritecond lines are less than cprasad's, but they all same conditions.By the way, i have just tested it before I wrote it.</ifmodule>

                Just do it..

                1 Reply Last reply Reply Quote 0
                • cprasad
                  cprasad @danatanseo last edited by Aug 13, 2012, 9:29 PM Aug 13, 2012, 9:29 PM

                  Hi,

                  Do not worry about the differences about the code provided by me and by Ersin. Both are same in functioning. He have just added module activation tags in to the code. So you may use any code which you prefer and works for you.

                  And the answer for your question about the code you were using, it may not be initiate a wildcard redirection.

                  Are there more codes inside the .htaccess?

                  If you can post the exact code without hyper-linking any url then I can tell you the exact reason why your code does not do the job.

                  Prasad

                  1 Reply Last reply Reply Quote 0
                  • danatanseo
                    danatanseo last edited by Aug 13, 2012, 8:55 PM Aug 13, 2012, 8:55 PM

                    Thanks Ersin,

                    Can you explain how your coding suggestion is different from Prasad's? I am not a coder so am just wondering if there's a different methodology behind the two suggestions?

                    ersaky danatanseo 2 Replies Last reply Aug 14, 2012, 12:16 PM Reply Quote 0
                    • danatanseo
                      danatanseo @cprasad last edited by Aug 13, 2012, 8:54 PM Aug 13, 2012, 8:54 PM

                      Yes, a catch-all makes sense to me. what is the difference between your code suggestion and the one just below posted by Ersin A. ? Also, just for our own understanding, can you explain why the code we were using wasn't accomplishing what we wanted? (I just want to be able to explain it to our Web team). Thanks!

                      cprasad 1 Reply Last reply Aug 13, 2012, 9:29 PM Reply Quote 0
                      • cprasad
                        cprasad last edited by Aug 13, 2012, 8:34 PM Aug 13, 2012, 8:34 PM

                        Hi,

                        The supplied url for interior page of old domain which you have mentioned not redirecting seems not correct. Because you have linked that text with the new domain. Anyway I have understand your problem. Your problem is

                        http://www.ccisound.com

                        is redirecting to

                        http://www.ccisolutions.com

                        but

                        http://www.ccisound.com/StoreFront/category/cd-duplicators

                        is not redirecting to

                        http://www.ccisolutions.com/StoreFront/category/cd-duplicators

                        If I have understood correctly, the solution for your problem is, Do a wildcard 301 redirection. It will redirects all the inner pages to the new domain's inner pages. But all the inner pages in new site, must have the same paths as the old site. Hope you understand what I mean.

                        Anyway when look in to the example urls you have provided it seems both sites have the same content. So there is nothing to worry about. Seems you have just changed domain name.

                        So anyway use the following code in your .htaccess file inside your root folder

                        RewriteEngine on

                        Options +FollowSymLinks

                        RewriteCond %{HTTP_HOST} ^ccisound.com$ [OR]
                        RewriteCond %{HTTP_HOST} ^www.ccisound.com$
                        RewriteRule ^(.*)$ "http://www.ccisolutions.com/$1" [R=301,L]

                        First and second line do not write again if those already written inside your .htaccess file.

                        the above code will initiate a wildcard 301 redirection and will solve your problem. Hope you can improve the code for all the other domains you have. Otherwise post here. I will do it for you.

                        Regards

                        Prasad

                        danatanseo 1 Reply Last reply Aug 13, 2012, 8:54 PM Reply Quote 1
                        • 1 / 1
                        1 out of 11
                        • First post
                          1/11
                          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

                        • SO_UK

                          301 Re-directing 'empty' domains

                          Hello, My client had purchased a few domains and 301 re-directed them, pointing to our main website. As far as I am aware the 'empty domains' are brand related but no content has ever been displayed on them, and I doubt they have much authority. The issue here is that we took a dive in ranking for our main keyword, I had a look on ahrefs and found the below: | www.empty-domain/our-keyword | 30 | 19 | 1 | fb 0
                          G+ 0
                          in 4 | REDIRECT 301 TO www.main-domain/our-keyword | 8 Feb '175 d | The ranking dip happened at the same time as the re-direct was re-discovered / re-crawled. Could the 'empty' URL in question been causing us any issues? I understand that this is terrible practice for 301 redirects, I was hoping someone in the community could shed light on any possible solution for this.

                          Technical SEO | Apr 21, 2017, 10:36 AM | SO_UK
                          0
                        • usDragons

                          Spammers created bad links to old hacked domain, now redirected to our new domain. Advice?

                          My client had an old site hacked (let's call it "myolddomain.com") and the hackers created many links in other hacked sites with links such as http://myolddomain.com/styless.asp?jordan-12-taxi-kids-cheap-T8927.html The old myolddomain.com site was redirected to a different new site since then, but we still see over a thousand spam links showing up in the new site's Search Console 404 crawl errors report. Also, using the links: operator in google search, we see many results of spam links. Should we be worried about these bad links pointing to our old site and redirecting to 404s on the new site? What is the best recommendation to clean them up? Ignore? 410s? Other? I'm seeing conflicting advice out there. The old site is hosted by the client's previous web developer who doesn't want to clean anything up on their end without an ongoing hosting contract. So beyond turning redirects on or off, the client doesn't want to pay for any additional hosting. So we don't have much control over anything related to "myolddomain.com". 😞 Thanks in advance for any assistance!

                          Technical SEO | May 13, 2016, 3:30 PM | usDragons
                          0
                        • kfallconnect

                          404 Error Pages being picked up as duplicate content

                          Hi, I recently noticed an increase in duplicate content, but all of the pages are 404 error pages. For instance, Moz site crawl says this page: https://www.allconnect.com/sc-internet/internet.html has 43 duplicates and all the duplicates are also 404 pages (https://www.allconnect.com/Coxstatic.html for instance is a duplicate of this page). Looking for insight on how to fix this issue, do I add an rel=canonical tag to these 60 error pages that points to the original error page? Thanks!

                          Technical SEO | May 9, 2016, 12:27 PM | kfallconnect
                          0
                        • KempRugeLawGroup

                          Why Can't Googlebot Fetch Its Own Map on Our Site?

                          I created a custom map using google maps creator and I embedded it on our site. However, when I ran the fetch and render through Search Console, it said it was blocked by our robots.txt file. I read in the Search Console Help section that: 'For resources blocked by robots.txt files that you don't own, reach out to the resource site owners and ask them to unblock those resources to Googlebot." I did not setup our robtos.txt file. However, I can't imagine it would be setup to block google from crawling a map. i will look into that, but before I go messing with it (since I'm not familiar with it) does google automatically block their maps from their own googlebot? Has anyone encountered this before? Here is what the robot.txt file says in Search Console: User-agent: * Allow: /maps/api/js? Allow: /maps/api/js/DirectionsService.Route Allow: /maps/api/js/DistanceMatrixService.GetDistanceMatrix Allow: /maps/api/js/ElevationService.GetElevationForLine Allow: /maps/api/js/GeocodeService.Search Allow: /maps/api/js/KmlOverlayService.GetFeature Allow: /maps/api/js/KmlOverlayService.GetOverlays Allow: /maps/api/js/LayersService.GetFeature Disallow: / Any assistance would be greatly appreciated. Thanks, Ruben

                          Technical SEO | Nov 10, 2015, 6:52 PM | KempRugeLawGroup
                          1
                        • IgorMateski

                          Should I disavow links from pages that don't exist any more

                          Hi. Im doing a backlinks audit to two sites, one with 48k and the other with 2M backlinks. Both are very old sites and both have tons of backlinks from old pages and websites that don't exist any more, but these backlinks still exist in the Majestic Historic index. I cleaned up the obvious useless links and passed the rest through Screaming Frog to check if those old pages/sites even exist. There are tons of link sending pages that return a 0, 301, 302, 307, 404 etc errors. Should I consider all of these pages as being bad backlinks and add them to the disavow file? Just a clarification, Im not talking about l301-ing a backlink to a new target page. Im talking about the origin page generating an error at ping eg: originpage.com/page-gone sends me a link to mysite.com/product1. Screamingfrog pings originpage.com/page-gone, and returns a Status error. Do I add the originpage.com/page-gone in the disavow file or not? Hope Im making sense 🙂

                          Technical SEO | Nov 3, 2014, 2:03 PM | IgorMateski
                          0
                        • DHS_SH

                          Duplicate Content Issues on Product Pages

                          Hi guys Just keen to gauge your opinion on a quandary that has been bugging me for a while now. I work on an ecommerce website that sells around 20,000 products. A lot of the product SKUs are exactly the same in terms of how they work and what they offer the customer. Often it is 1 variable that changes. For example, the product may be available in 200 different sizes and 2 colours (therefore 400 SKUs available to purchase). Theese SKUs have been uploaded to the website as individual entires so that the customer can purchase them, with the only difference between the listings likely to be key signifiers such as colour, size, price, part number etc. Moz has flagged these pages up as duplicate content. Now I have worked on websites long enough now to know that duplicate content is never good from an SEO perspective, but I am struggling to work out an effective way in which I can display such a large number of almost identical products without falling foul of the duplicate content issue. If you wouldnt mind sharing any ideas or approaches that have been taken by you guys that would be great!

                          Technical SEO | Jan 20, 2014, 3:17 PM | DHS_SH
                          0
                        • PooleyK

                          404 error - but I can't find any broken links on the referrer pages

                          Hi, My crawl has diagnosed a client's site with eight 404 errors. In my CSV download of the crawl, I have checked the source code of the 'referrer' pages, but can't find where the link to the 404 error page is. Could there be another reason for getting 404 errors? Thanks for your help. Katharine.

                          Technical SEO | Nov 17, 2012, 2:22 AM | PooleyK
                          0
                        • briankb

                          301 Redirect vs Domain Alias

                          We have hundreds of domains which are either alternate spelling of our primary domain or close keyword names we didn't want our competitor to get before us. The primary domain is running on a dedicated Windows server running IIS6 and set to a static IP. Since it is a static IP and not using host headers any domain pointed to the static IP will immediately show the contents of the site, however the domain will be whatever was typed. Which could be the primary domain or an alias. Two concerns. First, is it possible that Google would penalize us for the alias domains or dilute our primary domain "juice"? Second, we need to properly track traffic from the alias domains. We could make unique content for those performing well and sell or let expire those that are sending no traffic. It's not my goal to use the alias domains to artificially pump up our primary domain. We have them for spelling errors and direct traffic. What is the best practice for handling one or both of these issues?

                          Technical SEO | Mar 22, 2011, 4:14 PM | briankb
                          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.