HTML and CSS Reference
In-Depth Information
You may not have any control over your domain name, but you can exercise control over
the rest of your URLs. Say that you have a section of your site called “Products and
Services.” All the pages in that section are stored in their own directory. You could call it
any one of the following:
/ps
/prdsvcs
/products
/products_services
/products_and_services
There are plenty of other options, too (you could call it /massapequa if you wanted to),
but the preceding list seems like a reasonable group of options. Of the list, a few stand
out to me as being poor choices. /products_service and /products_and_services just
seem too verbose. If the pages under those directories have long names, you're suddenly
in long URL territory, which isn't conducive to sharing. On the other hand /prdsvcs
may be short, but it's also difficult to remember and almost certainly has to be spelled
out if you tell it to anyone. It's probably no good. That leaves two remaining choices:
/ps and /products . The first, /ps , is nice and short, and probably easy to remember.
Using it would be fine. However, there's one other principle of URLs that I want to talk
about: guessability.
Chances are that most of the people who visit your website have been using the Web for
awhile. There's some chance that they might just assume that they know where to go on
your site based on experience. If they want to read about your products, they may
guess—based on their experience with other sites they've visited—that your products
will be listed at http://www.your-url.com/products . Any time you can put your con-
tent where your users will assume it to be, you're doing them a favor. Using standard
directory names such as /about , /contact , and /products can make things ever so
slightly easier for your users at no cost to you.
19
My final bit of advice on URLs is to make sure that they reflect the structure of your site.
One time I worked on a site that consisted of hundreds of files, all in a single directory.
The site itself had structure, but the files were not organized based on that structure.
Whether the user was on the home page or five levels deep within the site, the URL was
still just a filename tagged onto the hostname of the server. Not only did this make the
site hard to work on, but it also kept some useful information away from users. Suppose
you have a site about cars. What's more useful to your users?
http://www.example.com/camry.html
or
http://www.example.com/cars/toyota/2009/camry.html
Search WWH ::




Custom Search