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. On-Page / Site Optimization
    4. How to fix duplicate content for homepage and index.html

    How to fix duplicate content for homepage and index.html

    On-Page / Site Optimization
    10 7 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.
    • dreservices
      dreservices last edited by

      Hello,

      I know this probably gets asked quite a lot but I haven't found a recent post about this in 2018 on Moz Q&A, so I thought I would check in and see what the best route/solution for this issue might be. I'm always really worried about making any (potentially bad/wrong) changes to the site, as it's my livelihood, so I'm hoping someone can point me in the right direction.

      Moz, SEMRush and several other SEO tools are all reporting that I have duplicate content for my homepage and index.html (same identical page).

      According to Moz, my homepage (without index.html) has PA 29 and index.html has PA 15. They are both showing Status 200. I read that you can either do a 301 redirect or add rel=canonical

      I currently have a 301 setup for my http to https page and don't have any rel=canonical added to the site/page. What is the best and safest way to get rid of duplicate content and merge the my non index and index.html homepages together these days? I read that both 301 and canonical pass on link juice but I don't know what the best route for me is given what I said above.

      Thank you for reading, any input is greatly appreciated!

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

        Google consider HTTP and HTTPS as two separate protocols. Since the contents are same on both versions, google bots consider it as duplicate content. Adding a canonical URL will solve this problem. If you have any doubts, feel free to ask.

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

          "I currently have a 301 setup for my http to https page" - great! Also, you should check if your inner pages redirecting from HTTP-versions to HTTPS too.

          index.html should redirect to the homepage main version with 301 Permanent Redirect.

          1 Reply Last reply Reply Quote 1
          • Seenlyst
            Seenlyst last edited by

            Hello there,

            You can use .htaccess URL rewrite to remove all the .html from your URL, here's the rewrite rules.

            RewriteEngine On
            RewriteRule ^index.html$ / [R=301,L]
            RewriteRule ^(.*)/index.html$ /$1/ [R=301,L]

            Once you added this rules you should also fix all your internal links make sure they link to the URL without .html

            Hope this helps,

            Joseph Yap

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

              Hi dre

              Your site really shouldn't be generating an index.html in the first place but if it is you must make sure that there is a 301 in the htaccess file sending all traffic to the single homepage URL as Lynn correctly points out this will be a permanent redirect.

              It is very simple to do. Both versions are treated as separate pages (as http and https) so you are essentially showing a duplicate site to Google so your rankings will be terrible until you change.

              Regards Nigel

              1 Reply Last reply Reply Quote 1
              • dreservices
                dreservices last edited by

                Thank you so much for all the responses. So it sounds like 301 redirect through htaccess is the way to go. What is the difference between using the 301 through htaccess vs using rel=canonical in my case? Does the 301 provide better link juice vs rel=canonical or is canonical just not applicable in this case? Thanks for all the replies and helpful suggestions again!

                EDIT: I spoke to my developer (who is hosting and maintaining my site now).. he said he tried to do 301 through htaccess but it seems to be crashing the site (and trust me he is very good at what he does). Part of the problem is that my site is VERY old (originally build about 10 years ago and NOT updated once since).. he has been slowly updating and cleaning up the site slowly and he will try to figure out why the 301 is crashing the site and not working but in the mean time how safe is it to use rel=canonical instead of a 301?

                Thanks again!

                Nigel_Carr KristinaKledzik 2 Replies Last reply Reply Quote 0
                • Nigel_Carr
                  Nigel_Carr @dreservices last edited by

                  Hi Dre

                  If you just do a canonical then the page will still be live, you will just be telling Google not to rank it. Best practice is to remove it all together and 301. It is bad practice having more than one version of your home page, (any page) live!

                  Regards Nigel

                  ThompsonPaul 1 Reply Last reply Reply Quote 0
                  • KristinaKledzik
                    KristinaKledzik @dreservices last edited by

                    It's best practice to redirect, but if that's not an option, the canonical route should help the problem a lot! You'll probably lose some link equity with this route, but it should clear up duplicate content issues from Google's side.

                    1 Reply Last reply Reply Quote 1
                    • ThompsonPaul
                      ThompsonPaul @Nigel_Carr last edited by

                      A proper canonical tag does a lot more than "just be telling Google not to rank it" When used properly (i.e. pages that truly do contain the same content), the canonicalised page passes its ranking signals back to the canonical source.

                      I agree with Kristina - while a 301 would be preferable (it's a directive, while canonical tags are taken as suggestions), a canonical tag would be vastly better than not doing anything about the issue. At least until the dev can get the problem with the 301-redirect properly resolved.

                      Paul

                      Nigel_Carr 1 Reply Last reply Reply Quote 0
                      • Nigel_Carr
                        Nigel_Carr @ThompsonPaul last edited by

                        OK, Paul, I hear what you are saying. It's a very open and obvious diss.

                        I'm not sure what you are saying makes any difference to the argument that the canonical way here is not the way to go. I was explaining in the simplest way, I would not want, and I'm sure you would not want either, a live page like this - the home page, live and canonicalised.

                        (It's a given that the canonical works like a 301, passing link juice to the preferred version.)

                        So thanks but it makes no difference - delete & 301 every time.

                        Google is heightening its distrust of canonicals - the new Seach Console tool reveals which pages are the preferred canonical and it's something of a surprise to SEOs!

                        If you feel like playing top trumps again then why not PM me? - it's so much better and the uninitiated do not need to see it!

                        Cheers Nigel

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        • How do I fix my portfolio causing duplicate content issues?
                          HonestSEOStudio
                          HonestSEOStudio
                          0
                          8
                          201

                        • Googlebot indexing URL's with ? queries in them. Is this Panda duplicate content?
                          sparrowdog
                          sparrowdog
                          0
                          6
                          456

                        • Duplicate Content aka 301 redirect from .com to .com/index.html
                          omakad
                          omakad
                          0
                          8
                          1.5k

                        • Duplicate Page Titles and Duplicate Content
                          AlanWills
                          AlanWills
                          0
                          7
                          280

                        • Index.php getting Duplicate page content.
                          Unity
                          Unity
                          0
                          3
                          943

                        • How Should I Fix Duplicate Content in Wordpress Pages
                          Motrd
                          Motrd
                          0
                          2
                          305

                        • How to fix duplicate page content and page titles?
                          prospects
                          prospects
                          1
                          3
                          403

                        • Duplicate content on homepage?
                          Alex-Harford
                          Alex-Harford
                          0
                          9
                          941

                        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