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. Duplicate Content - Home Page even wth Mod Rewrite 301

    Duplicate Content - Home Page even wth Mod Rewrite 301

    Technical SEO Issues
    4 3 1.0k
    • 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.
    • Force7
      Force7 last edited by

      Hi,

      It looks like Seomoz (and Screaming Frog) is showing my home page as duplicate content.

      http://www.mydomain.com         Page Authority 61     Linking root Domain 321

      http://www.mydomain.com/         Page Authority 61     Linking root Domain 321

      [Screaming Frog shows duplicate as]
      www.mydomain.com/
      www.mydomain.com/index.html}

      Years ago I hired someone to write the code for a rewrite for non www to be 301 redirected to www version. I was surprised at finding out that I still have a problem.

      Here is the code on my htaccess page.

      <ifmodule mod_rewrite.c="">RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} !^www.mydomain.com [NC]
      RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]</ifmodule>

      Was this code not properly written ?

      One more question, we were hit hard by Panda and Penguin, would something like this be that much of a factor.

      Thanks in advance,

      Force7

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

        Hey, You are solving multiple problems. The code looks properly written to solve one of those problems--the naked domain to www domain redirect. So long as going to http://mydomain.com 301 redirects to www.mydomain.com, then you know that piece is working.

        The second "problem" you have is that you can reach your home page with /index.html and without /index.html in the URL. So long as only one is indexed by Google, this isn't that big of a problem. You should however put in a canonical on your home page to make it clear which version you do want indexed. Then make sure all internal links go to that URL.

        Alternatively, you can 301 redirect /index.html to the root via the htacess file. That code would go something like this:

        RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.index.html\ HTTP/ RewriteRule ^(.)index.html$ /$1 [R=301,L]

        The third "problem" is that your home page can be accessed with or without a trailing slash. Again, I wouldn't say this is a problem unless both versions are indexed. And, like the home page, you can fix this by adding a canonical element to the home page and link to that canonical consistently within your site.

        However, this too can be fixed via htaccess. Here is an example of the htaccess code:

        RewriteCond %{HTTP_HOST} !^.mydomain.com$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

        Thanks,
        Matthew

        Titan552 1 Reply Last reply Reply Quote 1
        • Force7
          Force7 last edited by

          So if I understand correctly, I should have..

          <ifmodule mod_rewrite.c="">RewriteEngine On
          RewriteBase /
          RewriteCond %{HTTP_HOST} !^www.mydomain.com [NC]
          RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]</ifmodule>

          on the .htaccess and then also add

          RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.index.html\ HTTP/ RewriteRule ^(.)index.html$ /$1 [R=301,L]

          AND

          RewriteCond %{HTTP_HOST} !^.mydomain.com$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

          The internal linking structure of the site is as follows:  main navigation is usually absolute, http://www.domain.com/page.php     but throughout the site if I link a keyword i use the "/folder/page.php

          When I do a "site" command on Google I see the

          www.TranslationSoftware4u.com/   as the only one I saw listed

          Our hits are down 70% so I am paranoid about making a mistake during the process of trying to find out how to recover from the latest update.

          Appreciate the time you are taking to help answer this Matthew!

          Thanks,

          Force7

          1 Reply Last reply Reply Quote 0
          • Titan552
            Titan552 @Matthew_Edgar last edited by

            Thanks for the great advice.  But once you've added the non-www to www redirect as you wrote above, why not just do this in .htaccess for the ".html to /" issue?

            Redirect 301 /index.html http:/www.mydomain.com/

            Or

            In this case if you've done the ref canonical on he "/" home page, is that good enough or do you still need to redirect /index.html to "/"  ?

            Thanks!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Home page duplicate content...
              Andy.Drinkwater
              Andy.Drinkwater
              0
              6
              178

            • Added 301 redirects, pages still earning duplicate content warning
              alecfwilson
              alecfwilson
              0
              5
              121

            • Duplicate content or Duplicate page issue?
              Kurt_Steinbrueck
              Kurt_Steinbrueck
              0
              2
              106

            • Home Page .index.htm and .com Duplicate Page Content/Title
              TOMMarketingLtd.
              TOMMarketingLtd.
              0
              6
              1.6k

            • Mod Rewrite / .htaccess avoid duplicate content
              blacey
              blacey
              0
              8
              4.0k

            • Mod Rewrite question to prevent duplicate content
              kat2
              kat2
              0
              5
              635

            • 50+ duplicate content pages - Do we remove them all or 301?
              EGOL
              EGOL
              0
              4
              831

            • Duplicate Content Home Page
              wissamdandan
              wissamdandan
              0
              10
              1.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