homepage Welcome to WebmasterWorld Guest from 54.237.99.131
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
urls without .html or .htm pages on the end
caffinated



 
Msg#: 4235527 posted 5:39 am on Nov 27, 2010 (gmt 0)

When I build web pages, I use the popular historical process of calling the home page index.htm and lets say I have products.htm and services.htm on the site too.

So within index.htm I have links that look like:
<a href="http://website.com/products.htm">products</a>

Recently I have noticed some developers putting their pages in separate folders each with an index.htm, so their links to the same kind of content as above would like like:

<a href="http://website.com/products/">products</a>

Can anyone explain the reasons/benefits of the latter?

 

cmnetworx



 
Msg#: 4235527 posted 5:48 am on Nov 27, 2010 (gmt 0)

If you ever change your programming language, from html to php, asp, etc you can just place the appropriate index.(php|asp|?) file under that folder and delete the index.htm as opposed to making an .htaccess file to rewrite the request.

better than having all your links go to
domain.com/page2.html when your new page is
domain.com/page3.php

much easier to just go to
domain.com/page2

Either way .com/page2.html or domain.com/page2 both are easy to rewrite with an .htaccess file when it really boils down to it..

personally I like placing the documents in independent folders and named index.php because I hate seeing extensions..

caffinated



 
Msg#: 4235527 posted 7:20 am on Nov 27, 2010 (gmt 0)

Thanks cmnetworx. I ran a test and this process do work in html too.

You've explained re-write reasons, fair enough, but it is the last sentence there that I'm interested in. Is it simply a matter of visual preference or are there seo implications too perhaps relating to canonical url best practices?

cmnetworx



 
Msg#: 4235527 posted 7:43 am on Nov 27, 2010 (gmt 0)

To me its just visual, As far as I know there are no seo downsides to url's with extensions (index.html).

it is easier to tell a user to go to
www.website.com/blah
than website.com/blah.html, or .shtml, etc.

but then again 80% of the time you tell a user to enter the url in their address bar they end up googling it anyways.. This wouldn't suck so bad if they didn't get confused by sponsored links..

milosevic



 
Msg#: 4235527 posted 10:25 am on Nov 30, 2010 (gmt 0)

Yes, it looks better, I think for me it's probably a small factor in choosing what search engine result to click on.

cmnetworx



 
Msg#: 4235527 posted 4:55 pm on Nov 30, 2010 (gmt 0)

when I am going down through the list of search results on google or something I don't care either way if it has a file extension or not.. It's just on my domains. I think its because typing .htm takes so much more effort, lol.. Actually in my scenario I try to not make it completely obvious that I am using php this way some noob won't try to mess with my pages/forms or sql injections.. because if they think I am running something else (anything else) at least their attempts would be a waste of time..

milosevic



 
Msg#: 4235527 posted 9:16 am on Dec 1, 2010 (gmt 0)

Usually I wouldn't pay any attention to it, but results with a filetype URL are in my experience more likely to be spam with certain areas of queries.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved