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 duplicate content

    301 redirect for duplicate content

    Intermediate & Advanced SEO
    4 3 388
    • 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.
    • AdeLewis
      AdeLewis last edited by

      Hey,

      I have just started working on a site which is a video based city guide, with promotional videos for restaurants, bars, activities,etc.

      The first thing that I have noticed is that every video on the site has two possible urls:-

      http://www.domain.com/venue.php?url=rosemarino
      http://www.domain.com/venue/rosemarino

      I know that I can write a .htaccess line to redirect one to the other:-

      redirect 301 /venue.php?url=rosemarino http://www.domain.com/venue/rosemarino

      but this would involve creating a .htaccess line for every video on the site and new videos that get added may get missed.

      Does anyone know a way of creating a rule to rewrite these urls?

      Any help would be most gratefully received.

      Thanks.

      Ade.

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

        Hi,

        I think the canonical tag may be useful in this situation.

        If the URLs follow the same format you could create a regular expression for the 301, which in theory would prevent missing videos and would essentially be a much cleaner/elegant way of meeting your requirement.

        Hope this helps.

        Aran_Smithson 1 Reply Last reply Reply Quote 2
        • Aran_Smithson
          Aran_Smithson @lavellester last edited by

          Agreed a Canonical tag will solve your Dupe content issue.

          Though I think theres a deeper issue. I will hazard a guess that you already ahve a set of rewrite rules which allow the _http://www.domain.com/venue/rosemarino_ URL to work?

          A redirect may get you stuck in a loop if the venue.php is rewritten to /venue/rosemarino

          AdeLewis 1 Reply Last reply Reply Quote 1
          • AdeLewis
            AdeLewis @Aran_Smithson last edited by

            Hi.

            Thanks for both of your replies, I really appreciate the help.

            You were 100% right Aran, I just checked through the .htaccess file and there is already a rewrite rule which converts the nice SEO friendly one in to the not so nice and friendly one.

            This seemed like madness to me but when I looked deeper it appears that the developer has included this rewrite rule so that the query string attached to the URL can be used for pulling stuff from a databse on various pages.

            Not the best for SEO but the whole site seems to rely on this.

            I have added some coding in to the site that uses the same query string to create a rel canonical tag.

            Thanks again for the help, I wouldn't have got there without the guidance.

            Ade.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • 301 redirect to avoid duplicate content penalty
              riyaaaz
              riyaaaz
              0
              3
              146

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

            • Duplicate content - how to diagnose duplicate content from another domain before publishing pages?
              Chemometec
              Chemometec
              0
              7
              141

            • Blog tags are creating excessive duplicate content...should we use rel canonicals or 301 redirects?
              evolvingSEO
              evolvingSEO
              0
              5
              307

            • Duplicate content within sections of a page but not full page duplicate content
              J_Sinclair
              J_Sinclair
              0
              3
              112

            • Will using 301 redirects to reduce duplicate content on a massive scale within a domain hurt the site?
              AlanMosley
              AlanMosley
              0
              4
              218

            • Duplicate content resulting from js redirect?
              matbennett
              matbennett
              0
              6
              2.3k

            • Duplicate content even with 301 redirects
              RyanKent
              RyanKent
              0
              4
              408

            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