Crawl issues/ .htacess issues
-
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
-
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?
-
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
-
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
-
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.
-
Could you please give some more details?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Recovering from Sitemap Issues with Bing
Hi all, I recently took over SEO efforts for a large e-commerce site (I would prefer not to disclose). About a month ago, I began to notice a significant drop in traffic from Bing and uncovered in Bing Webmaster Tools that three different versions of the sitemap were submitted and Bing was crawling all three. I removed the two out of date sitemaps and re-submitted the up to date version. Since then, I have yet to see Bing traffic rebound and the amount of pages indexed by Bing is still dropping daily. During this time there has been no issue with traffic from Google. Currently I have 1.3 million pages indexed by Google while Bing has dropped to 715K (it was at 755K last week and was on par with Google several months ago). I know that no major changes have been made to the site in the past year so I can't point to anything other than the sitemap issue to explain this. If this is indeed the only issue, how long should I expect to wait for Bing to re-index the pages? In the interim I have been manually submitting important pages that aren't currently in the index. Any insights or suggestions would be very much appreciated!
Technical SEO | | tdawson090 -
Is it needed to use http:// or not?
Hi, When doing link building and getting my URL to other websites, is it necessary that the other websites include http:// before the domain? Example: I want to increase the number of links to my site www.example.com . When I ask other websites to add a link to my site, should I ask them to use http://www.example.com or is www.example.com enough (without http://)? Or it really does not matter? Thanks in advance, Sam
Technical SEO | | Awaraman0 -
Rel Canonical Crawl Notices
Hello, Within the Moz report from the crawl of my site, it shows that I had 89 Rel Canonical notices. I noticed that all the pages on my site have a rel canonical tag back to the same page the tag is on. Specific example from my site is as follows: http://www.automation-intl.com/resistance-welding-equipment has a Rel Canonical tag <link rel="<a class="attribute-value">canonical</a>" href="http://www.automation-intl.com/resistance-welding-equipment" />. Is this self reference harmless and if so why does it create a notice in the crawl? Thanks in advance.
Technical SEO | | TopFloor0 -
What is the best practice to seperate different locations and languages in an URL? At the moment the URL is www.abc.com/ch/de. Is there a better way to structure the URL from an SEO perspective?
I am looking for a solution for using a new URL structure without using www.abc.com**/ch/de** in the URL to deliver the right languages in specific countries where more than one language are spoken commonly. I am looking forward to your ideas!
Technical SEO | | eviom0 -
Do I have panda issues?
Hi , I m looking for suggestions for my website i believe is suffering from the panda updates. Can someone point out what possible issues within the site that might be causing with recent panda updates? here is the link http://goo.gl/St3aP thanks nick.
Technical SEO | | orion680 -
Do Collections in Shopify create Duplicate Pages according to Google/Bing/Yahoo?
I'm using the e-commerce platform Shopify to host an e-store. We've put our products into different collections. Shopify automatically creates different URL paths to a product in multiple collections. I'm worried that the same product listed in different collections is soon as different pages, and therefore duplicate content by Google/Bing/Yahoo. Would love to get your opinion on this concern! Thanks! Matthew
Technical SEO | | HappinessDigital0 -
Geotargeting issue
Hi, So ive just starting working on a travel website and noticed that the .com website outranks the com.au in Australian SERPS, even though the .au site has been geotargeted (In GWT) for Australia.I also geotargeted the .com website to Canada (the primary place of business). Is this advisable? Will this affect rankings?
Technical SEO | | Tourman0 -
How to solve issues regarding canonicalization?
Today, I was searching for article which may help me in issues regarding canonicalization and found very interesting article on SEOmoz. I am facing issues regarding de-indexing of pages and down of organic search engine visits. I have done proper R & D and apply it very carefully. But, still my indexed pages and visits are going down. I have applied canonical tag to following pages. Narrow by search: http://www.vistastores.com/outdoor-umbrellas?manufacturer=California+Umbrella Sorting: http://www.vistastores.com/outdoor-umbrellas?dir=desc&order=position Pagination: http://www.vistastores.com/outdoor-umbrellas?p=2 How can I improve my performance?
Technical SEO | | CommercePundit0