Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Intermediate & Advanced SEO
    4. Duplicate Content From Indexing of non- File Extension Page

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Duplicate Content From Indexing of non- File Extension Page

    Intermediate & Advanced SEO
    4
    22
    3383
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • WebbyNabler
      WebbyNabler last edited by

      Google somehow has indexed a page of mine without the .html extension.  so they indexed  www.samplepage.com/page, so I am showing duplicate content because Google also see's  www.samplepage.com/page.html   How can I force google or bing or whoever to only index and see the page including the .html extension?  I know people are saying not to use the file extension on pages, but I want to, so please anybody...HELP!!!

      1 Reply Last reply Reply Quote 0
      • WebbyNabler
        WebbyNabler @Mike.Goracke last edited by

        Yeah I looked further into the URL removal, but I guess technically I did not meet the criteria....and honestly I am fearful other potential implications of removal....I guess I will just have to wait for the 301 to ick in.  I just cant believe there is not a simple .htaccess code to cause all URL's to show the .html extension.  I mean it is a simple thing to implement the reverse and have the extension dropped...I mean....good lord...

        Thanks for all your help though Mike, I truly appreciate the efforts!

        1 Reply Last reply Reply Quote 0
        • Mike.Goracke
          Mike.Goracke @WebbyNabler last edited by

          LAME! You may just want to let the 301 redirect you have in place take its course or remove the URL from Google's index since it was added by mistake anyway.

          Mike

          WebbyNabler 1 Reply Last reply Reply Quote 0
          • WebbyNabler
            WebbyNabler @TakeshiYoung last edited by

            Nope. .....good lord....

            Mike.Goracke 1 Reply Last reply Reply Quote 0
            • WebbyNabler
              WebbyNabler @Mike.Goracke last edited by

              Nope. 😞

              1 Reply Last reply Reply Quote 0
              • Mike.Goracke
                Mike.Goracke @TakeshiYoung last edited by

                If that does not work, give this a whirl:

                RewriteCond %{REQUEST_URI} !\.[a-zA-Z0-9]{3,4}

                RewriteCond %{REQUEST_URI} !/$

                RewriteRule ^(.*)$ $1.html

                WebbyNabler 1 Reply Last reply Reply Quote 0
                • TakeshiYoung
                  TakeshiYoung @WebbyNabler last edited by

                  Try:

                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^([^.]*[^./])$ /$1.html [R=301,L]

                  Mike.Goracke WebbyNabler 2 Replies Last reply Reply Quote 0
                  • WebbyNabler
                    WebbyNabler @TakeshiYoung last edited by

                    That caused the same "500 Internal Server Error" .......   😞

                    TakeshiYoung 1 Reply Last reply Reply Quote 0
                    • TakeshiYoung
                      TakeshiYoung @WebbyNabler last edited by

                      Try my code without all the other redirects, and see if it works. If it does, then add back the other redirects one by one until everything works.

                      WebbyNabler 1 Reply Last reply Reply Quote 0
                      • WebbyNabler
                        WebbyNabler @Mike.Goracke last edited by

                        Oh, and my site auditor is seeing it as a directory with a file in it???  Ugghhh....

                        1 Reply Last reply Reply Quote 0
                        • WebbyNabler
                          WebbyNabler @Mike.Goracke last edited by

                          Nope.  Didn't work.  I am seriously about to lose my mind with this....

                          TakeshiYoung 1 Reply Last reply Reply Quote 0
                          • Mike.Goracke
                            Mike.Goracke @WebbyNabler last edited by

                            Maybe give this a whirl:

                            If URL does not contain a period or end with a slash

                            RewriteCond %{REQUEST_URI} !(.|/$)

                            append .html to requested URL

                            RewriteRule (.*) /$1.html [L]

                            WebbyNabler 2 Replies Last reply Reply Quote 0
                            • WebbyNabler
                              WebbyNabler @TakeshiYoung last edited by

                              I get a server error when I do this?  Sooo confused...  Here is the htaccess changes I made.  FYI...I have removed the code you told me to put in there temporarily so the site's not down.  I attached the server error screenshot too...

                              Options +FollowSymlinks
                              RewriteEngine On

                              RewriteCond %{REQUEST_URI} ! .html$
                              RewriteCond %{REQUEST_URI} ! /$
                              RewriteRule ^(.*)$ $1.html

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

                              RewriteCond %{HTTP_HOST} ^www.hanneganconstructionllc.com [NC]
                              RewriteRule ^(.*)$ http://hanneganremodeling.com/$1 [L,R=301]

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

                              RewriteCond %{HTTP_HOST} ^www.hremodeling.com [NC]
                              RewriteRule ^(.*)$ http://hanneganremodeling.com/$1 [L,R=301]

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

                              RewriteBase /
                              RewriteCond %{HTTP_HOST} ^hanneganremodeling.com$ [NC]
                              RewriteRule ^(.*)$ http://www.hanneganremodeling.com/$1 [R=301,L]

                              m9Kq8yJ

                              Mike.Goracke 1 Reply Last reply Reply Quote 0
                              • TakeshiYoung
                                TakeshiYoung @WebbyNabler last edited by

                                You repeat this code a few times, maybe that's the problem? Pretty sure you only need it once:

                                RewriteEngine On
                                Options +FollowSymlinks
                                RewriteBase /

                                The line:

                                RewriteEngine On

                                Also only needs to be included once in an htaccess file. You may want to remove all the other instances.

                                Try adding this code at the very top, after the first "RewriteEngine On":

                                RewriteCond %{REQUEST_URI} ! .html$
                                RewriteCond %{REQUEST_URI} ! /$
                                RewriteRule ^(.*)$ $1.html

                                WebbyNabler 1 Reply Last reply Reply Quote 0
                                • WebbyNabler
                                  WebbyNabler @Mike.Goracke last edited by

                                  Thanks Mike, you are awesome!  I actually was thinking to do that, but I was concerned that it might have some larger implications?

                                  I also just resubmitted a sitemap so hopefully that "might" speed up the crawl process...

                                  Thanks again!

                                  1 Reply Last reply Reply Quote 0
                                  • Mike.Goracke
                                    Mike.Goracke @WebbyNabler last edited by

                                    "I accidentally manually submitted the url to google and manually in submitted it to index and that when this issue began...."

                                    It sounds like you accidently added this URL to the index. You can follow the procedure outlined below to request Google remove the specific URL from the index:

                                    https://support.google.com/webmasters/bin/answer.py?hl=en&answer=59819

                                    I checked your site's structure using Screaming Frog and it does not appear that you are linking to any non-.html versions. If I perform a scan using one of your non-.html pages, it appears that it only links to itself.

                                    Since you have the 301 redirect in place, you can choose to wait it out and Google should correct things eventually; otherwise, requesting Google remove the URL is a faster... PERMANENT process.

                                    Good luck.

                                    Mike

                                    WebbyNabler 1 Reply Last reply Reply Quote 1
                                    • WebbyNabler
                                      WebbyNabler @NakulGoyal last edited by

                                      No it's not a wordpress, it was created with Dreamweaver.  I didn't make sample and sample.html same page, but google is treating it that way....  I have implemented the 301, so I guess I just have to wait for a crawl

                                      Mike.Goracke 1 Reply Last reply Reply Quote 0
                                      • WebbyNabler
                                        WebbyNabler @TakeshiYoung last edited by

                                        Thank you very for your input!  When I implement into my .htacces what you suggested I get a "Internet 500 Server Error" ?   Maybe it would help if I list what I currently have in my .htaccess  I had to redirect some old domains and did canonical redirects and default non .index....I hope this help, I am at my wit's end...  I also attached a screenshot of the webmaster warning... THANKS!!!

                                        Options +FollowSymlinks
                                        RewriteEngine On

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

                                        RewriteCond %{HTTP_HOST} ^www.hanneganconstructionllc.com [NC]
                                        RewriteRule ^(.*)$ http://hanneganremodeling.com/$1 [L,R=301]

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

                                        RewriteCond %{HTTP_HOST} ^www.hremodeling.com [NC]
                                        RewriteRule ^(.*)$ http://hanneganremodeling.com/$1 [L,R=301]

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

                                        RewriteEngine On
                                        Options +FollowSymlinks
                                        RewriteBase /
                                        RewriteCond %{HTTP_HOST} ^hanneganremodeling.com$ [NC]
                                        RewriteRule ^(.*)$ http://www.hanneganremodeling.com/$1 [R=301,L]

                                        Options +FollowSymLinks
                                        RewriteEngine On
                                        RewriteBase /

                                        u1YvXLR

                                        TakeshiYoung 1 Reply Last reply Reply Quote 0
                                        • NakulGoyal
                                          NakulGoyal @WebbyNabler last edited by

                                          Is this a wordpress based site ? What CMS are you using ? How were you able to get domain.com/sample and domain.com/sample.html be the same page ? Either way, canonical tag is the correct solution in this case. There's no need for a 301 and if you do 301 redirects, you are not really fixing the issue caused by your CMS System.

                                          I would therefore strongly advise to use the canonical tag. That's the intended use of that tag.

                                          WebbyNabler 1 Reply Last reply Reply Quote 1
                                          • TakeshiYoung
                                            TakeshiYoung @WebbyNabler last edited by

                                            A canonical tag won't physically redirect you when you visit the page, it just lets the search engines know which is the right page to index.

                                            If you want to actually redirect using .htaccess, try using this code

                                            RewriteEngine On

                                            RewriteCond %{REQUEST_URI} ! .html$

                                            RewriteCond %{REQUEST_URI} ! /$

                                            RewriteRule ^(.*)$ $1.html

                                            WebbyNabler 1 Reply Last reply Reply Quote 0
                                            • WebbyNabler
                                              WebbyNabler @TakeshiYoung last edited by

                                              I tried the canonical and when I enter the url without the .html, it doesn't resolve to the url with the .html extension.  I tried an .htaccess reirect...I am stumped, I can't get it to redirect automatically the the .html  I accidentally manually submitted the url to google and manually in submitted it to index and that when this issue began....

                                              TakeshiYoung NakulGoyal 2 Replies Last reply Reply Quote 0
                                              • TakeshiYoung
                                                TakeshiYoung last edited by

                                                Add a canonical tag to your header so that Google/Bing knows which version of your page they should be indexing.

                                                You can also try looking into where the link to the non-html page is coming from. If it's an internal link, just change it so that Google doesn't continue to crawl it.

                                                WebbyNabler 1 Reply Last reply Reply Quote 0
                                                • 1 / 1
                                                • First post
                                                  Last post

                                                Got a burning SEO question?

                                                Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                                                Start my free trial


                                                Browse Questions

                                                Explore more categories

                                                • Moz Tools

                                                  Chat with the community about the Moz tools.

                                                • SEO Tactics

                                                  Discuss the SEO process with fellow marketers

                                                • Community

                                                  Discuss industry events, jobs, and news!

                                                • Digital Marketing

                                                  Chat about tactics outside of SEO

                                                • Research & Trends

                                                  Dive into research and trends in the search industry.

                                                • Support

                                                  Connect on product support and feature requests.

                                                • See all categories

                                                Related Questions

                                                • ajiabs

                                                  Duplicate content due to parked domains

                                                  I have a main ecommerce website with unique content and decent back links. I had few domains parked on the main website as well specific product pages. These domains had some type in traffic. Some where exact product names.  So main main website www.maindomain.com had domain1.com , domain2.com parked on it. Also had domian3.com parked on www.maindomain.com/product1. This caused lot of duplicate content issues. 12 months back, all the parked domains were changed to 301 redirects. I also added all the domains to google webmaster tools. Then removed main directory from google index. Now realize few of the additional domains are indexed and causing duplicate content. My question is what other steps can I take to avoid the duplicate content for my my website 1. Provide change of address in Google search console. Is there any downside in providing change of address pointing to a website? Also domains pointing to a specific url , cannot provide change of address 2. Provide a remove page from google index request in Google search console. It is temporary and last 6 months. Even if the pages are removed from Google index, would google still see them duplicates? 3. Ask google to fetch each url under other domains and submit to google index. This would hopefully remove the urls under domain1.com and doamin2.com eventually due to 301 redirects. 4. Add canonical urls for all pages in the main site. so google will eventually remove content from doman1 and domain2.com due to canonical links. This wil take time for google to update their index 5. Point these domains elsewhere to remove duplicate contents eventually. But it will take time for google to update their index with new non duplicate content. Which of these options are best best to my issue and which ones are potentially dangerous? I would rather not to point these domains elsewhere. Any feedback would be greatly appreciated.

                                                  Intermediate & Advanced SEO | | ajiabs
                                                  0
                                                • iamgreenminded

                                                  Trailing Slashes for Magento CMS pages - 2 URLS - Duplicate content

                                                  Hello, Can anyone help me find a solution to Fixing and Creating Magento CMS pages to only use one URL  and not two URLS? www.domain.com/testpage www.domain.com/testpage/ I found a previous article that applies to my issue, which is using htaccess to redirect request for pages in magento 301 redirect to slash URL from the non-slash URL.  I dont understand the syntax fully in htaccess , but I used this code below. This code below fixed the CMS page redirection but caused issues on other pages, like all my categories and products with this error: "This webpage has a redirect loop ERR_TOO_MANY_REDIRECTS" Assuming you're running at domain root.  Change to working directory if needed. RewriteBase / # www check If you're running in a subdirectory, then you'll need to add that in to the redirected url (http://www.mydomain.com/subdirectory/$1 RewriteCond %{HTTP_HOST} !^www. [NC]
                                                  RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] Trailing slash check Don't fix direct file links RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.)/$
                                                  RewriteRule ^(.)$ $1/ [L,R=301] Finally, forward everything to your front-controller (index.php) RewriteCond %{REQUEST_FILENAME} !-f
                                                  RewriteCond %{REQUEST_FILENAME} !-d
                                                  RewriteRule .* index.php [QSA,L]

                                                  Intermediate & Advanced SEO | | iamgreenminded
                                                  0
                                                • friendoffood

                                                  Pages are Indexed but not Cached by Google. Why?

                                                  Here's an example: I get a 404 error for this: http://webcache.googleusercontent.com/search?q=cache:http://www.qjamba.com/restaurants-coupons/ferguson/mo/all But a search for qjamba restaurant coupons gives a clear result as does this: site:http://www.qjamba.com/restaurants-coupons/ferguson/mo/all What is going on?  How can this page be indexed but not in the Google cache? I should make clear that the page is not showing up with any kind of error in webmaster tools, and Google has been crawling pages just fine.  This particular page was fetched by Google yesterday with no problems, and even crawled again twice today by Google  Yet, no cache.

                                                  Intermediate & Advanced SEO | | friendoffood
                                                  2
                                                • fablau

                                                  Can too many "noindex" pages compared to "index" pages be a problem?

                                                  Hello, I have a question for you: our website virtualsheetmusic.com includes thousands of product pages, and due to Panda penalties in the past, we have no-indexed most of the product pages hoping in a sort of recovery (not yet seen though!). So, currently we have about 4,000 "index" page compared to about 80,000 "noindex" pages. Now, we plan to add additional 100,000 new product pages from a new publisher to offer our customers more music choice, and these new pages will still be marked as "noindex, follow". At the end of the integration process, we will end up having something like 180,000 "noindex, follow" pages compared to about 4,000 "index, follow" pages. Here is my question: can this huge discrepancy between 180,000 "noindex" pages and 4,000 "index" pages be a problem? Can this kind of scenario have or cause any negative effect on our current natural SEs profile? or is this something that doesn't actually matter? Any thoughts on this issue are very welcome. Thank you! Fabrizio

                                                  Intermediate & Advanced SEO | | fablau
                                                  0
                                                • bjs2010

                                                  How to find all indexed pages in Google?

                                                  Hi, We have an ecommerce site with around 4000 real pages. But our index count is at 47,000 pages in Google Webmaster Tools. How can I get a list of all pages indexed of our domain? trying to locate the duplicate content. Doing a "site:www.mydomain.com" only returns up to 676 results... Any ideas? Thanks, Ben

                                                  Intermediate & Advanced SEO | | bjs2010
                                                  0
                                                • HiteshBharucha

                                                  Duplicate content on subdomains.

                                                  Hi Mozer's, I have a site www.xyz.com and also geo targeted sub domains www.uk.xyz.com, www.india.xyz.com and so on. All the sub domains have the content which is same as the content on the main domain that is www.xyz.com. So, I want to know how can i avoid content duplication. Many Thanks!

                                                  Intermediate & Advanced SEO | | HiteshBharucha
                                                  0
                                                • CommercePundit

                                                  Number of Indexed Pages are Continuously Going Down

                                                  I am working on online retail stores. Initially, Google have indexed 10K+ pages of my website. I have checked number of indexed page before one week and pages were 8K+. Today, number of indexed pages are 7680. I can't understand why should it happen and How can fix it? I want to index maximum pages of my website.

                                                  Intermediate & Advanced SEO | | CommercePundit
                                                  0
                                                • digisavvy

                                                  There's a website I'm working with that has a .php extension. All the pages do. What's the best practice to remove the .php extension across all pages?

                                                  Client wishes to drop the .php extension on all their pages (they've got around 2k pages). I assured them that wasn't necessary. However, in the event that I do end up doing this what's the best practices way (and easiest way) to do this? This is also a WordPress site. Thanks.

                                                  Intermediate & Advanced SEO | | digisavvy
                                                  0

                                                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
                                                Free SEO Tools
                                                • Domain Authority Checker
                                                • Link Explorer
                                                • Keyword Explorer
                                                • Competitive Research
                                                • Brand Authority 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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                                                • Accessibility
                                                • Terms of Use
                                                • Privacy

                                                Looks like your connection to Moz was lost, please wait while we try to reconnect.