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

    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 Issues
    12 3 2.6k
    • 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.
    • ersaky
      ersaky last edited by

      This post is deleted!
      danatanseo 1 Reply Last reply Reply Quote 1
      • danatanseo
        danatanseo @cprasad last edited by

        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 Reply Quote 0
        • danatanseo
          danatanseo @ersaky last edited by

          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 Reply Quote 0
          • cprasad
            cprasad @danatanseo last edited by

            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
            • ersaky
              ersaky @danatanseo last edited by

              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
              • danatanseo
                danatanseo @danatanseo last edited by

                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
                • cprasad
                  cprasad last edited by

                  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 Reply Quote 1
                  • danatanseo
                    danatanseo @cprasad last edited by

                    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 Reply Quote 0
                    • danatanseo
                      danatanseo @cprasad last edited by

                      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
                      • cprasad
                        cprasad @danatanseo last edited by

                        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
                        • 1 / 1
                        • First post
                          Last post
                        • 301 Domain Redirect And Old Domain to a New one including pages
                          brooksmanley
                          brooksmanley
                          0
                          2
                          62

                        • Getting high priority issue for our xxx.com and xxx.com/home as duplicate pages and duplicate page titles can't seem to find anything that needs to be corrected, what might I be missing?
                          Todd_McDonald
                          Todd_McDonald
                          0
                          4
                          4.0k

                        • Joomla creating duplicate pages, then the duplicate page's canonical points to itself - help!
                          Eurasmus.com
                          Eurasmus.com
                          0
                          9
                          890

                        • Why can't I redirect 302 errors to 301's?
                          Chris.Menke
                          Chris.Menke
                          0
                          3
                          80

                        • Duplicate Page Content error but I can't see it
                          KateWaite85
                          KateWaite85
                          0
                          5
                          237

                        • 132 pages reported as having Duplicate Page Content but I'm not sure where to go to fix the problems?
                          SEODinosaur
                          SEODinosaur
                          0
                          5
                          664

                        • Is there ever a time when 301 redirects aren't possible?
                          DCochrane
                          DCochrane
                          0
                          4
                          259

                        • SEOMoz is indicating I have 40 pages with duplicate content, yet it doesn't list the URL's of the pages???
                          RobertFisher
                          RobertFisher
                          0
                          2
                          391

                        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

                        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