Helping people with computers... one answer at a time.

Designers and implementers make a lot of choices when setting up a web site. Names and domains and even the need for slashes are among them.

Is it necessary for some sites (& for me when going to them) to put a / at the end of their address? Life is hard enough!

I'm going to expand on your question a little, because it actually opens up a small can of worms ... a small, but confusing can of worms.

You see, the answer is "yes", "no", "sometimes" and "usually not".

There's an amazing lack of consistency.

Let's start with the "/". The question boils down to this: is

http://ask-leo.com

the same as

http://ask-leo.com/
"In most cases they're they same."

and if not, which should you use?

In most cases, they're the same. And by most cases, I'd say 99.99% of the time. You may find that once you get there the "/" has been added automatically, but that doesn't really matter. Either approach works.

I'll even go so far as to say that either should always work.

Most of the time.

The problem, of course, is that it's quite possible for a web site to be ultra-picky and require one or the other, or behave differently between the two. I'd consider it a misconfiguration, but it's possible. And which one you want will depend on how that server's been (mis)configured.

In many ways, it's the same as the old "www." or not argument. You'll note that both

http://www.ask-leo.com

and

http://ask-leo.com

take you to the same place. There's actually no requirement that they do so. "www." could be a completely different web site, though convention is to treat it as synonymous as the non-www version. I've definitely seen websites that fail to implement one or the other. That, once again, is a misconfiguration in my opinion.

And once again, which one you need depends on how that site was (mis)configured.

The part that I added on to your question is the ".html" versus ".htm" debate, since it too is something that site implementers choose and that the rest of us (visitors) then have to use and live with - and be confused by.

".htm" and ".html" are both HTML (HyperText Markup Language) files. Web pages. They are the same thing, but with different names. And a web site that uses ".htm" likely will not respond to ".html", and vice versa. It's somewhat like identical twins who look a like and act alike but have different names and stubbornly insist that you call them by their correct names before they will react.

".html" is the older, and more descriptive of the two. ".htm" comes from a time when web servers were being implemented in Windows, where extensions - the filename after the last dot - were limited to three characters in length.

The good news is that most of the time you need not know or care. You'll go to a site, say http://ask-leo.com, and navigate by clicking on links, or saving bookmarks or copy/pasting URLS without ever typing one in or even noticing whether or not I use ".htm" or ".html" (or, as I do in some cases, something else entirely).

Article C3746 - May 28, 2009 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

4 Comments
Minot Isok
May 28, 2009 9:49 AM

If *.html and *.htm are the same what about graphic files labelled as *.jpg and *.jpeg? I have graphic files with both these extensions.

Yes, .jpg and .jpeg are usually the same thing.
- Leo
29-May-2009

Jonathan
May 28, 2009 12:05 PM

.JPG and .JPEG should be the same. Just in the old "DOS" days people had to use a 8.3 filename system, people could not use more then 3 letters after the period. Also I believe that why there is .html and .htm.

Steve Elliott
May 29, 2009 12:22 AM

On many sites, if you typed .htm and the file has .html, the server will give you the correct page back (or vice versa)- unless there was both a .htm and a .html with the same name of course!

I know that my server certainly does (For tech heads out there, it's Apache 1.3 - and it uses a server code of 301 (Moved Permanently) to implement the change automatically as far as the end-user is concerned)

As Leo says, it's all in how the site's server has been configured.

Carl R. Goodwin
June 2, 2009 6:27 PM

I look after several websites, some of which were written over 5 years ago. The older pages have the ".html" extension, and the newer pages that I have created (using Expression Web 2 and Dreamweaver) have the ".htm" extension.

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.