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. Html code for none .index

    Html code for none .index

    On-Page / Site Optimization
    7 3 481
    • 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.
    • mato
      mato last edited by

      In the diagnostic I have several errors in Duplicate Page Content and Title. The thing is that the errors is on the same page but with "different" names. One is called http://siteX.com/ another is called http://www.siteX.com/ and the same third one is called
      http://www.siteX.com/index.html

      How do I go about changing all three sites, I have changed the /index.html one but dont know how to catch the other once. Is it possible, if it is I would like to know how?

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

        The first step would be to redirect the http://siteX.com to http://www.siteX.com or vice versa. You can easily do this with .htaccess if you have a LAMP server. Here is the code to put in your .htaccess to redirect from non-www to www (replace example.com with your site name) -

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

        As for handling http://siteX.com/index.html, simply redirect that as well with .htaccess -

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

        I would also suggest adding a rel="canonical" tag to your pages just in case the search engines come across URLs with parameters, such as index.html?q=1235 then they know to index only the version of the page you designated.

        Hope that helps!

        mato 1 Reply Last reply Reply Quote 0
        • mato
          mato @StreamlineMetrics last edited by

          I am not sure what kind of server I have but this is whats in my .htaccess

          -FrontPage-

          IndexIgnore .htaccess /.?? *~ *# /HEADER /README /_vti

          <limit get="" post="">order deny,allow
          deny from all
          allow from all</limit>
          <limit put="" delete="">order deny,allow
          deny from all</limit>

          How do I do it?

          StreamlineMetrics mato 3 Replies Last reply Reply Quote 0
          • Jinx14678
            Jinx14678 last edited by

            Please take what I say below with a grain of salt, as I am very good with .htaccess, but not so great when Frontpage is in the loop. Also back up ALL files before making ANY changes for quick replace if creates a "Internal Server Error"

            _vti_bin/
            _vti_adm
            _vti_auth

            Should be in your structure, each with an .htaccess

            add the line

            Options +FollowSymlinks

            to each one

            Now the just add everything streamline metrics has suggested, to the current .htaccess and test

            You can try adding what streamline metrics suggests, without the above steps, as .htaccess is not dependent on Frontpage, and the Frontpage extensions have nothing to do with .htaccess (from research i found on the web)

            1 Reply Last reply Reply Quote 0
            • StreamlineMetrics
              StreamlineMetrics @mato last edited by

              Okay, the fact you already have an .htaccess file means you should be able to try adding the rules I provided. Put them at the top of the .htaccess file and test.

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

                I have done the following, is that correct? If it is why cant I see any directions, for ex. I put www.siteX.com/index.html or siteX.com and get the same ?

                -FrontPage-

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

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

                IndexIgnore .htaccess /.?? *~ *# /HEADER /README /_vti

                <limit get="" post="">order deny,allow
                deny from all
                allow from all</limit>
                <limit put="" delete="">order deny,allow
                deny from all</limit>

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

                  An other thing.

                  I missed changing the example.com to my site and no it goes to example.com, even if I change it or even delete the file...still there.

                  I there a way to go around it?

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • What is the correct code to write the rel=canonical in the HTML HEAD of the page?
                    Martijn_Scheijbeler
                    Martijn_Scheijbeler
                    0
                    6
                    122

                  • Index or No Index (Panda Issue)
                    Carson-Ward
                    Carson-Ward
                    0
                    5
                    371

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

                  • Google Map Marker not showing up when using HTML Embed Code
                    0
                    1
                    503

                  • Does Commented HTML Code Get Spidered?
                    donford
                    donford
                    0
                    6
                    958

                  • No index?
                    mad2k
                    mad2k
                    0
                    3
                    289

                  • Html and css errors - what do SE spiders do if they come across coding errors? Do they stop crawling the rest of the code below the error
                    pab1
                    pab1
                    0
                    3
                    511

                  • ON SITE SEARCH INDEXED BY GOOGLE - no follow or no index
                    ShaMenz
                    ShaMenz
                    0
                    4
                    770

                  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