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. How can I prevent duplicate content between www.page.com/ and www.page.com

    How can I prevent duplicate content between www.page.com/ and www.page.com

    Technical SEO Issues
    4 3 536
    • 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.
    • onlineexpression
      onlineexpression last edited by

      SEOMoz's recent crawl showed me that I had an error for duplicate content and duplicate page titles.

      This is a problem because it found the same page twice because of a '/' on the end of one url.

      e.g. www.page.com/ vs. www.page.com

      My question is do I need to be concerned about this. And is there anything I should put in my htaccess file to prevent this happening.

      Thanks!
      Karl

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

        Hi there,

        This should solve your problem

         <code>#removes trailing slash
                 RewriteCond %{REQUEST_FILENAME} !-f
                 RewriteCond %{REQUEST_FILENAME} !-d
                 RewriteCond %{HTTP_HOST} !^\.localhost$ [NC]
                 RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301,L]</code>
        

        If you wish to redirect from non-trailing slash to trailing slash,

        let me you know and I'll send you htaccess for that
        

        Kind regards

        
        Bojan
        1 Reply Last reply Reply Quote 0
        • Catalyste
          Catalyste last edited by

          Yes you should adress this problem. Put something like this in your .htaccess :

          Options +FollowSymLinks
          RewriteEngine On
          
          # REDIRECT to canonical url
          RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
          RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
          
          
          1 Reply Last reply Reply Quote 0
          • onlineexpression
            onlineexpression last edited by

            Thanks a lot for your quick replys. I have it sorted now 🙂

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Hi! I'm wondering whether for keyword SEO - a url should be www.salshoes.com/shoes/mens/day-wear (so with a few parent categories) or www.salshoes.com/shoes-mens-day-wear is ok for on page optimization?
              _nitman
              _nitman
              0
              5
              165

            • 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

            • Moving from www.domain.com/nameofblog to www.domain.com/blog
              cathibanks
              cathibanks
              0
              6
              153

            • Container Page/Content Page Duplicate Content
              ProductiveEdge
              ProductiveEdge
              1
              4
              194

            • How do I stop www.mysite.com/ showing as a duplicate of www.mysite.com
              Dr-Pete
              Dr-Pete
              0
              5
              509

            • I am trying to correct error report of duplicate page content. However I am unable to find in over 100 blogs the page which contains similar content to the page SEOmoz reported as having similar content is my only option to just dlete the blog page?
              evolvingSEO
              evolvingSEO
              0
              4
              344

            • Why do I get duplicate pages, website referencing the capital version of the url vs the lowercase www.agi-automation.com/Pneumatic-grippers.htm
              TimKelsey
              TimKelsey
              0
              7
              547

            • Duplicate Homepage: www.mysite.com/ and www.mysite.com/default.aspx
              MaryAnneG
              MaryAnneG
              0
              4
              2.3k

            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