Draft - Make readable URIs

This is a draft "webmaster tip", under work and review by the Quality Assurance Team, and shouldn't be considered as an official tip from W3C while it remains a draft.

This draft has been severly critized during its review; a tentative updated draft tries to address them.

Use directories instead of ?aid=342h987f2


Today it is common for persons to use different computers and browsers, which do not readily synchronize bookmarks with each other. If your page use URIs like "http://www.site.com/fishing/" instead of "http://www.site.com/?aid=342h987f2", it is more likely that users will be able to remember the URI for later reference. Thus they will avoid excessive use of search engines, and won't need to find the link on your possibly over-crowded first page.


A small script and a table is enough to make your URI look great! The trick to remember is to separate location and functionality, thus making sure that no variables will have to be included in the URI to get to the correct page, and that you do not get an excessive amount of directories by making a new one for each of the possible values for variables.

Use index.html instead of fishing.shtml


Most (all?) web servers will serve "http://www.site.com/fishing/index.shtml" (or whichever extension) if you type the address "www.site.com/fishing" in the address field of the browser. By refering only to the directory, the URI is practically shortened by six characters when compared to "http://www.site.com/fishing.shtml". You will also hide implementation details (server-parsed HTML) which users should not have to remember.


Make sure URIs only refer to directories. This should work even if you submit variables in the URI.

Use /index.html.no instead of /no/index.html


Some (all?) web servers support checking the browser settings to determine the best "index.html.lang" to serve. Thus the whole existence of an English version of a web page can be hidden to users which have specified that they prefer Norwegian pages, and they may never have to worry about reading (and perhaps not understanding) "Not seeing the language you expected?".


Upgrade your web server as needed, rename the files accordig to ISO 639, and include information on the main page as to how one can change the language settings of the browser.

Enable localized directory names


A Norwegian without knowledge of basic English would like to be able to remember "www.site.com/fiske/stenger" instead of "www.site.com/fishing/rods".


Use symbolic links to point to the directories where all the "index.html.lang" files are located. Thus you will not have a lot of extra directories to worry about, and the "masking" will be transparent to users.

Further Reading

About the "QA Tips"

The W3C QA Tips are short documents explaining useful bits of knowledge for Web developers or designers, hosted and produced by the Quality Assurance Interest Group at W3C.

While the tips are carefully reviewed by the participants of the group, they should not be seen as anything else than informative bits of wisdom, and especially, they are not normative W3C technical specifications.

Learn more about the Tips, how to submit your own pearls of wisdom, and find all the other QA tips in the Tips Index.

Created Date: 2003-08-26 by Victor Engmark
Last modified $Date: 2006/11/24 01:20:24 $ by $Author: ot $