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. Technical SEO Issues
    4. Crawl issues/ .htacess issues

    Crawl issues/ .htacess issues

    Technical SEO Issues
    6 4 1.1k
    • 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.
    • automart
      automart last edited by

      My site is getting crawl errors inside of google webmaster tools. Google believe a lot of my links point to index.html when they really do not. That is not the problem though, its that google can't give credit for those links to any of my pages. I know I need to create a rule in the .htacess but the last time I did it I got an error. I need some assistance on how to go about doing this, I really don't want to lose the weight of my links.

      Thanks

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

        Could you please give some more details?

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

          Sean,

          Here are some resources that I have for you

          http://www.webforgers.net/mod-rewrite/mod-rewrite-syntax.php

          http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html

          Hope they help you in understanding how to go about .htaccess.

          As far as I understand, you are facing the issue since you pointed yourinterlinking URLs to your .index.html page rather than your absolute URLs.

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

            Are you asking for the code to redirect index.html to / ?

            This should work (put the whole thing in your .htaccess and replace example with your site)

            RewriteEngine On Options +FollowSymLinks

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

            RewriteCond %{THE_REQUEST} ^./index.html
            RewriteRule ^(.
            )index.html$ http://www.example.com/$1 [R=301,L]

            However, you should also change your internal links to point to the redirected version (/) and not /index.html

            automart 1 Reply Last reply Reply Quote 1
            • automart
              automart @StalkerB last edited by

              My site was done in wordpress so do I need to do anything differently. Also this code will redirect http://www.mysite.com/index.html to http://www.mysite.com?

              Thanks a lot

              StalkerB 1 Reply Last reply Reply Quote 0
              • StalkerB
                StalkerB @automart last edited by

                WordPress does it automatically if you've got your permalinks set up.

                WordPress .htaccess should look like this:

                BEGIN WordPress

                <ifmodule mod_rewrite.c="">RewriteEngine On
                RewriteBase /
                RewriteRule ^index.php$ - [L]
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule . /index.php [L]</ifmodule>

                END WordPress

                And it should be .php not .html anyway in WP 😕

                Is WMT finding links to .html pages from pages on your site or from external links?

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Crawl Issues / Partial Fetch Via Google
                  vikasnwu
                  vikasnwu
                  0
                  5
                  574

                • Google Crawling Issues! How Can I Get Google to Crawl My Website Regularly?
                  libero_net
                  libero_net
                  1
                  8
                  142

                • Crawl issues
                  Christy-Correll
                  Christy-Correll
                  0
                  3
                  105

                • Http:// to https:// 301 or 302 redirect
                  Kingof5
                  Kingof5
                  1
                  7
                  284

                • <sub>& <sup>tags, any SEO issues?</sup></sub>
                  TranslateMediaLtd
                  TranslateMediaLtd
                  0
                  3
                  1.1k

                • Do I use /es/, /mx/ or /es-mx/ for my Spanish site for Mexico only
                  RoxBrock
                  RoxBrock
                  0
                  3
                  147

                • Duplicate content /index.php/ issues
                  ThompsonPaul
                  ThompsonPaul
                  1
                  5
                  867

                • Crawl issue
                  Mrlocicero
                  Mrlocicero
                  0
                  3
                  202

                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