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. How to resolve Duplicate Page Content issue for root domain & index.html?

    How to resolve Duplicate Page Content issue for root domain & index.html?

    Intermediate & Advanced SEO
    10 8 11.2k
    • 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.
    • ContentWriterMicky
      ContentWriterMicky last edited by

      SEOMoz returns a Duplicate Page Content error for a website's index page, with both domain.com and domain.com/index.html isted seperately. We had a rewrite in the htacess file, but for some reason this has not had an impact and we have since removed it. What's the best way (in an HTML website) to ensure all index.html links are automatically redirected to the root domain and these aren't seen as two separate pages?

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

        You wish to canonicalize the pages. That is the SEO word which describes exactly what you are trying to achieve.

        domain.com

        domian.com/

        www.domain.com

        www.domain.com/

        domain.com/index.html

        Above are 5 URLs which can possibly lead to the exact same page. If you add the following HTML in the code then the pages will be canonicalized.

        Guest 1 Reply Last reply Reply Quote 1
        • BedeFahey
          BedeFahey last edited by

          As you did, I'd normally handle this with a 301 from index.html to the root domain. When you say that it's "not had an impact" do you mean that the SEOmoz dashboard continues to show an error after it re-crawls, or that the search engines are not picking up the redirect?

          SEOmoz dashboard does a great job, but I'd check to see how the search engines are actually indexing yourdomain.com/index.html vs. yourdomain.com also. If the search engines are indexing it as you want them to, then I'd be inclined to ignore the dashboard error.

          I apologize if this is a stupid question, but I assume you manually checked that the redirect worked?

          ContentWriterMicky 1 Reply Last reply Reply Quote 1
          • ContentWriterMicky
            ContentWriterMicky @BedeFahey last edited by

            RewriteEngine on RewriteCond %{HTTP_HOST} ^([a-z.]+)?amarasoftware.com$ [NC] RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule .? http://www.%1amarasoftware.com%{REQUEST_URI} [R=301,L] Is what I use. In Seomoz this leads to www.amarasoftware.com and index.html so 2 different URL's, both with different incoming links, and a different authority, which has an impact on my ranking if correct. in SEomoz this a returns a duplicate title and meta tags errors. If SEOmoz finds 2 pages instead of one I may assume that Google agrees with this.

            BedeFahey SteveOllington 2 Replies Last reply Reply Quote 0
            • BedeFahey
              BedeFahey @ContentWriterMicky last edited by

              Unfortunately I can't speak for how SEOmoz handles rewrites like this if it's already crawled the page.

              The rewrite rule you're using looks like it's only rewriting the www portion of the URL, not index.html. So alone it wouldn't do anything to solve dupe content issues. (someone please correct me if I'm misreading the rewrite rule)

              Here's a link to what I used to write a redirect for index.html on another site.

              http://www.webmasterworld.com/forum92/6375.htm

              I think it is a fairly safe assumption to make that SEOmoz is smart enough to realize if you're got a redirect in there (providing that its working). I'd still recommend taking a look to see if Google has cached or indexed an index.html version, though.

              Edit: my personal, highly technical, acid-test for an index.html redirect is just going there and manually entering the url with index.html on the end, rather than waiting for a recrawl to see if you're heading in the right direction.

              1 Reply Last reply Reply Quote 0
              • SteveOllington
                SteveOllington @ContentWriterMicky last edited by

                I'd check it with some other software too... i.e. Raven Tools free trial or something, that will tell you if there's canonicalization problems... of course I'm not advocating Raven Tools over SEOmoz tools (I'm a member here and not there for good reasons), I just think best to try a few different tests before deciding if it's a problem. There might just be an issue with the SEOmoz campaign tool for the moment, which I'm sure they'll fix as soon as they realise.

                Hey, aren't you the tutor I had in my SEC usability course?

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

                  Here's the .htaccess rewrite command that you can use for the index.html redirect -

                  Options +FollowSymlinks                                                                                                   RewriteEngine on

                  Index Rewrite                                                                                                                   RewriteRule ^index.(htm|html|php) http://www.amarasoftware.com/ [R=301,L]              RewriteRule ^(.*)/index.(htm|html|php) http://www.amarasoftware.com/$1/ [R=301,L]


                  We set  up our site to utilize a index redirect for all of our sub directories as well, so with this method you simply name your sub directories to match the url path that you desire. Each sub directory has it's own index which you redirect with a variation of the above code. By doing this you can have nice clean url paths like http://www.semclix.com/design/ecommerce/ - and mitigate the duplicate content issue. We hope that this helps.

                  SEMPassion willyg 2 Replies Last reply Reply Quote 1
                  • Guest
                    Guest @RyanKent last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • SEMPassion
                      SEMPassion @SEMCLIX last edited by

                      You touched on a good point here "We set  up our site to utilize a index redirect for all of our sub directories as well, so with this method you simply name your sub directories to match the url path that you desire. Each sub directory has it's own index which you redirect with a variation of the above code. By doing this you can have nice clean url paths like http://www.semclix.com/design/ecommerce/ - and mitigate the duplicate content issue. We hope that this helps."

                      Too often I see sites where they get the home page right but miss the re-write on the directories.

                      1 Reply Last reply Reply Quote 1
                      • willyg
                        willyg @SEMCLIX last edited by

                        great code Josh...but , after i saved it on .htaccess , a "?" appeared on the link..

                        http://www.domain.com/?/example/file.html

                        Is this ok ? pls advice/

                        Thank you,

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        • Duplicate content issue with pages that have navigation
                          DSM_UK
                          DSM_UK
                          0
                          5
                          178

                        • Parameter Strings & Duplicate Page Content
                          Linda-Vassily
                          Linda-Vassily
                          0
                          4
                          134

                        • Duplicate content on the same page--is this an issue?
                          Andropenis_Australia
                          Andropenis_Australia
                          0
                          2
                          291

                        • Duplicate Page Title/Content Issues on Product Review Submission Pages
                          PartyStore
                          PartyStore
                          0
                          7
                          747

                        • Another duplicate page title www.domain.com vs www.domain.com/index.html question
                          Matt-Williamson
                          Matt-Williamson
                          0
                          2
                          405

                        • How do I fix the error duplicate page content and duplicate page title?
                          rtavs
                          rtavs
                          0
                          4
                          467

                        • Duplicate content on index.htm page
                          Fatfreddy
                          Fatfreddy
                          0
                          5
                          765

                        • The system shows duplicate content for the same page (main domain and index.html). Is this an error of SEOMOZ?
                          moskowman
                          moskowman
                          0
                          12
                          702

                        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