File Under: HTML5, Programming, Web Basics

A Guide to Designing Cool URLs

URLs are an often overlooked part of web design, yet in many ways they may be the most important aspect of your website. Webmonkey readers are no doubt familiar with the basics of good URL design — URLs should be readable and, most importantly, cool URLs never change.

If, perchance, you’ve never spent too much time thinking about URLs, now is good time to read the W3C guide on the subject. But beyond the basics of good URL design, the web is awash in a variety of URL best practices, some better than others. GitHub designer Kyle Neath recently posted an excellent article on what makes a good URL, how you can make your URLs better and why it matters:

URLs are universal. They work in Firefox, Chrome, Safari, Internet Explorer, cURL, wget, your iPhone, Android and even written down on sticky notes. They are the one universal syntax of the web. Don’t take that for granted.

Some designers will no doubt argue that the URL doesn’t matter. Those of us who pay attention to URLs are in the minority. Most web surfers simply search. There’s some merit to that argument, but it doesn’t mean you shouldn’t give some careful thought to crafting your URLs. Web browsers are putting much more emphasis on the URL bar, combining it with the search bar in many cases, which means words in your URL become searchable via the user’s browsing history.

Neath’s article covers how to design URLs with that in mind, as well as numerous other suggestions. Neath knows his stuff too, you’d be hard pressed to find a site with better URLs than GitHub.

Among Neath’s suggestions are to make sure you have namespaces, make sure your URLs are for humans, not search engines and make sure every page on your site has a URL. The whole article is well worth a read — particularly the part on planning ahead so that, for example, user names don’t conflict with future site features.

Neath also walks through a couple of examples that use the new HTML5 browser history Javascript APIs, which make dynamically updating the URL bar much simpler than was previously possible.

As web developer Jeff Croft writes in reference to Neath’s post, “if your development platform doesn’t let you have full control over the design of your URLs, get a new one.”

Eat at URLs photo by Scott Schiller/Flickr/CC.

See Also: