.html - Does it have a negative effect?


My site is 8-10 major “branches” - right now each of them is a url mysite.com/pageX.html - I’ve noticed a lot of other sites will just use mysite.com/pageX/ making it look like a subdirectory not a page. Technically I know how to do this - I’m just curious if anyone is aware of any difference the two formats have in terms of how search engines look at my site.


There’s no advantage in terms of search engine optimization. It does, however, require less typing. Furthermore, if you change your backend solution down the road, you won’t have to re-direct all your pages.

Right now the pages aren’t actually .html pages they are JSPs - but I have a rewrite filter in front that allows them to be referenced as .html. I was just curious if there was any benefit of /pagex/ versus /pagex.html - sounds like there isn’t.

On a related note - is there any thought on adding key words to the url e.g.-


Using the rewrite filter I can easily make this format the URL referenced by my internal links without changing the code - right now my page names don’t really have keywords in them.

The URL should be easy to read, remember and type. You want to make your URLs user-friendly first. Don’t think keywords and search engine optimization first, when it comes to essential site design decisions. Always put your users first! After you’ve thought about your users’ needs, consider the needs of your potential users. Only then should you even start to think about search engines.

The CMS I’ve build has a seperate field, where I can specify the desired URL to the article. I usually just use the title of the article as the URL, so that e.g. Guide to Great Web Hosts would become example.com/guide-to-great-web-hosts. I could easily do this automatically, removing punctuation and replacing spaces for hyphens, but doing it manually means I can skip any part of the title which doesn’t make sense in a URL, and I can shorten the title to prevent excessively long URLs.

As a side note: Don’t fall into temptation, and use URLs like example.com/2839/the-article-about-stuff (where 2839 is the article ID in the database). If your CMS is well-build, you can just as easily search for the article using the text string as you can with the ID. It can technically impair performance, but only if you have an obscene amount of traffic. The big problem with including both the article ID and the title in the URL is that your articles will actually be harder to read, remember and type, in that you are in fact increasing the amount of information the user has to cope with. And remember, if sites like Wikipedia can have unique articles titles for all their articles, then your website can too :slight_smile:

Search engines don’t care about the format of your URLs. Why would they? Is website.com/pagex likely to offer visitors a better service than website.com/pagex.html? It might do, or it might not, but you can’t tell that from the URL format.

But, as others have said, it does affect the usability. The more you give people to type in, the more likely they are to get it wrong. They might miss the extension off, they might mistype it (eg .htm instead of .html). If they are putting it in a tweet, every character is valuable, and the extra 5 needed for .html might break it. And it can create more work for you if you change your platform subsequently.

If I was building a new site from scratch, I might be tempted to go down the route of no file extensions. But for a site that’s already out there, you might find that changing now would cause you more work and more hassle, for only a limited benefit.