Welcome to WebmasterWorld Guest from 54.198.90.50

Forum Moderators: incrediBILL

Message Too Old, No Replies

Folder vs .HTML

What seems to work better

     
6:56 pm on Jul 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 12, 2002
posts: 1132
votes: 0


It's been awhile since a researched this topic.
Any news other which is better or does it still not make a difference.

What is better to have:
http://www.example.com/keyword-id/
or
http://www.example.com/keyword-id.html
7:18 pm on July 15, 2011 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts: 4987
votes: 12


I personally would choose the former over the latter because it is platform agnostic (you could move from an ASP based site to a PHP based site with no changes to links).
7:22 pm on July 15, 2011 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 2002
posts:735
votes: 8


Using the folder option allows one to:

http://www.example.com/keyword-1/keyword-2.html

Changing the file extension on server move would be the only hassle as Fotiman pointed out.
7:53 pm on July 15, 2011 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13062
votes: 303


Are you asking about what the user sees or about your underlying file structure? If you're talking about the names at face value, you're looking at a choice between a top-level file

http://www.example.com/keyword-id.html

and a subdirectory

http://www.example.com/keyword-id/index.html {or equivalent}

That choice depends on your own site and what's most convenient for you.

You can rewrite either one from

http://www.example.com/keyword-id

but by default, anything without an extension will send your server looking for a directory and then for the index.whatever file in that directory. If they don't find it, some servers will then proceed to Option B, looking for a file with that name. It depends on whether a particular mod is present and enabled, but to be safe you'd better spend some time with your .htaccess.

Which is a different forum ;)
8:21 pm on July 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 12, 2002
posts: 1132
votes: 0


We wouldn't changing the programming language any time soon.
@lucy; with a server load perspective; better off being direct instead of having .com/keyword/ correct?
8:31 pm on July 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Use a trailing slash ONLY if the URL is for a folder or for the index page in a folder.

Extensionless URLs for pages do not have a trailing slash.
9:24 pm on July 15, 2011 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13062
votes: 303


with a server load perspective; better off being direct instead of having .com/keyword/ correct?

I think your post overlapped g1 because I am tolerably certain he would have said to refer to the Index file as
/keyword/
rather than write it out explicitly as
/keyword/index.whatever

The reason is probably buried in the Apache docs somewhere.
10:05 pm on July 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Never link to a named index page as a URL. It's Duplicate Content. Link to the canonical URL (ending with a trailing slash) instead. It also causes problems when you change the technology that runs the site.