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. Duplicate content on homepage?

    Duplicate content on homepage?

    On-Page / Site Optimization
    9 3 941
    • 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.
    • idv
      idv last edited by

      Hi

      I have just created a new campaign and it states that I have duplicate page content which would affect search rankings.

      Basically it is counting my site www.mydomain.com and www.mydomain.com/index.php as two seperate pages.

      How can I make it so that only www.mydomain.com is visible reducing the duplicate content issue?

      Many Thanks

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

        To avoid this, you can use the following ModRewrite rules in your .htaccess file:

        RewriteEngine on 
        RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ 
        RewriteRule ^index\.html$ http://www.domain.com/ [R=301,L] 
        
        

        Also make sure that all your links back to the home page (both in your navigation and your internal links) are www.mydomain.com and not  www.mydomain.com/index.php

        idv 1 Reply Last reply Reply Quote 0
        • idv
          idv @First last edited by

          Is there a way of achieving this without using the .htaccess file?

          First idv 3 Replies Last reply Reply Quote 0
          • First
            First @idv last edited by

            The best way is to do both but if you dont have access to the .htaccess file than just  remove ALL of the link back to www.mydomain.com/index.php and replace with www.mydomain.com

            1 Reply Last reply Reply Quote 0
            • idv
              idv @idv last edited by

              I have access to the FTP root but cant locate a .htaccess file - does this go under the root and do you just open notepad enter (I have replaced .html with .php is this correct as I am not using .html suffix)

              RewriteEngine on 
              RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ 
              RewriteRule ^index\.php$ http://www.domain.com/ [R=301,L] 
              

              and save as .htaccess under the web root ?

              1 Reply Last reply Reply Quote 0
              • First
                First @idv last edited by

                Yes, it does go under the root.

                Yes, just open notepad

                Yes, change the .html to .php

                1 Reply Last reply Reply Quote 0
                • Alex-Harford
                  Alex-Harford last edited by

                  Add  rel="canonical" href="http://www.mydomain.com" /> or <link <span>rel="canonical" href="http://www.mydomain.com/[](http://www.publicservice.co.uk/)" /> (depending on your preferred version - those would be considered two separate pages too) between the head tags of your homepage. This will let Google know of your change and combine the page authority of any stray index.php's left over.</link <span>

                  You should be careful about uploading a new .htaccess page as you might be writing over something important that already exists, so make sure this isn't the case.

                  P.S. This is in addition to what First says about changing the links, and if you use IIS you can set rewrite rules in there without having to mess with a .htaccess file.

                  idv 1 Reply Last reply Reply Quote 0
                  • idv
                    idv @Alex-Harford last edited by

                    Thanks

                    So in the header on the page if I include

                    <link <span>rel="canonical" href=http://www.mydomain.com/></link <span>

                    This will tell Google, Bing etc that my preferred option is http://www.mydomain.com over http://www.mydomain.com/index.php

                    And this can be used in conjunction with the .htaccess file which I have already added under the web root as per Firsts advice.

                    Or is this not required if I have already uploaded a .htaccess file?

                    Thanks guys for all your advice

                    Alex-Harford 1 Reply Last reply Reply Quote 0
                    • Alex-Harford
                      Alex-Harford @idv last edited by

                      Yes, not forgetting the quotes around the URL. I would still add one, but there are others who wouldn't. More information here:

                      http://www.seomoz.org/blog/complete-guide-to-rel-canonical-how-to-and-why-not (note it's a year old)

                      http://www.seomoz.org/blog/cross-domain-canonical-the-new-301-whiteboard-friday

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      • How to fix duplicate content for homepage and index.html
                        Nigel_Carr
                        Nigel_Carr
                        0
                        10
                        2.6k

                      • Hi - How do you get rid of duplicate content that was accidentally created on a tag url? For example, when I published a new article, the content was duplicated on: /posts/tag/lead-generation/
                        MikeRoberts
                        MikeRoberts
                        0
                        4
                        82

                      • Avoiding Duplicate Title Tags and Duplicate Content
                        Marston_Gould
                        Marston_Gould
                        1
                        11
                        344

                      • Duplicate content issues - page content and store URLs
                        MonicaOConnor
                        MonicaOConnor
                        0
                        2
                        161

                      • Duplicate content: Form labels and field content
                        eyepaq
                        eyepaq
                        0
                        3
                        156

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

                      • Duplicate content
                        KaneJamison
                        KaneJamison
                        0
                        2
                        270

                      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