The Importance of URLs
I've gotten on a kick lately about keeping the URLs of websites clean and intuitive. Originally, long URLs were necessary in the days of serving up static files, since the structure of the URL coincided with the hierarchy of the filesystem. In other words,
http://www.site.com/this/was/literally/the/path/to/the_file.html.
Then dynamic content came around and we got into more trouble with URLs. By sending different parameters to a server side script, for example, you could generate different pages. We're all familiar with the cryptic URLs at Amazon and Mapquest, MSN, and so forth. Everything seemed to live in cgi-bin, back in the late 90's. (I actually used to think bin literally meant bin, as in, a place to dump all the cgi scripts, but 'cgi-bin' stands for Common Gateway Interface binaries).
Then we started to see all these new file extensions: .asp, .jsp, .php, the list goes on. You could tell what technology a website was running on by looking at the URL. But, if things got switched around, your bookmarks to the site became worthless.
I've come to realize that the URLs within your site are really important. First of all,
URLs matter to search engines. But more importantly, they matter to humans too. You should strive to achieve these goals for URLs to the pages of your website:
- Memorable - You don't want your visitors asking themselves, "how do I find that page again?"
- Intuitive - Visitors should be able to guess the URLs of main products or services your company offers (e.g. apple.com/ipod/ & apple.com/powerbook/)
- Relevant - This goes along with intuitive, but it also underscores the importance of URLs coinciding with keywords people will search on to find you. Use terms your customers would use, instead of cryptic filenames and directory names that may seem easier to use during website development.
- Short - Less typing, less possibility of the end of the URL getting chopped off (in the event someone cuts and pastes your URL into an email to a friend, for example).
- Permanent - URLs should be easily bookmarked, and bookmarks should work six months later.
- Clean - Avoid filename extensions or parameterized pages whenever possible. You don't necessarily want visitors or competitors (or any snoopers) to know what technologies you are using, what vulnerabilities they can test out, etc.
Posted by joseph at January 25, 2005 06:07 PM