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
                • From: http://www. to https://
                  Tymen
                  Tymen
                  1
                  4
                  121

                • 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

                • Have a client that migrated their site; went live with noindex/nofollow and for last two SEOMoz crawls only getting one page crawled. In contrast, G.A. is crawling all pages. Just wait?
                  Nobody1560986989723
                  Nobody1560986989723
                  0
                  5
                  422

                • /forum/ or /hookah-forum/
                  Heydarian
                  Heydarian
                  0
                  4
                  359

                • Http:// vs http://www.
                  fun52dig
                  fun52dig
                  0
                  8
                  474

                • Crawling image folders / crawl allowance
                  BlinkWeb
                  BlinkWeb
                  0
                  8
                  2.4k

                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