Forum Moderators: phranque

Message Too Old, No Replies

Google indexing /folder/ and not /folder/index.htm

         

reggy

2:36 am on Feb 18, 2008 (gmt 0)

10+ Year Member



Hello,
I have a problem with google indexing some of my pages with /folder/ and not /folder/index.htm even though i have Option - Indexes in my .htacess file

The strange thing is that its only doing this on some pages and not others even though all the pages are listed as /folder/index.htm

What could be wrong in this case?

Thank You!

jdMorgan

3:00 am on Feb 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is wrong is that Google (and Web standards) would 'prefer' that the index pages be accessible at example.com/ and example.com/subdir/ -- There is no reason to make the URL any longer by adding additional path characters that 'don't do anything.'

In addition, there is no reason for you to expose the underlying technology of your site by specifying index.html or <anything>.html in the URL.

That's the "Web standards" view. The practical view is that you've probably done nothing to prevent index.html from being accessible at "/", so Google, other search engines, and other Webmasters prefer to use the shorter path to save bytes or typing or both.

How to fix it: After considering whether you really want to use the longer path, decide which one URL your index pages should be accessible from, and redirect all other URLs that result in that same page being served to the one you want to use. For example, permanently redirect all but one of the following to the other:

http://example.com/
http://www.example.com/
http://example.com/index.html
http://www.example.com/index.html
http://example.com/?any-bogus-query-string
http://www.example.com/?any-bogus-query-string
http://example.com/index.html?any-bogus-query-string
http://www.example.com/index.html?any-bogus-query-string

and then there's subdomains and https, too, if you're using them...

Jim

reggy

3:58 pm on Feb 19, 2008 (gmt 0)

10+ Year Member



Hi Jim,
Thanks for the response - I tried redirecting using the line below but it now gave me a "page not found" error

redirect 301 /folder/index.htm [domain.com...]

Thanks