I've read a great deal of discussion recently (both on this site and elsewhere) about "friendly URLs" but I'm not sure what exactly makes a URL "friendly" and why we really even care (up to a certain point). Illustration:
The following is an example of a URL that would be held up by the majority of current web developers as "friendly":
www.myblog.com/posts/123/this-is-the-name-of-my-blog-post
Whereas this would be considered "unfriendly" (i.e. bad, Neanderthal, ignorant, stupid):
www.myblog.com/posts.aspx?id=123
My questions:
- Doesn't the "friendly" URL contain duplicate identifying information about the blog post in question? In other words, once you have the id (123) of the post, why do you need the title? Wouldn't this be a violation of the "don't repeat yourself" mantra?
- What difference does the form of a URL make as far as users are concerned? Do users ever actually type full URLs by hand (other than the TLD, of course)? Do users ever look to the URL of a page to determine what the page is about? Why do we need the title of the blog post in the URL? Isn't that what the page's
<title>
tag and content are for? - I often hear SEO as a reason why the "friendly" URL form is preferred. Why does a search engine spider care about the URL? Aren't they just automated pieces of software that crawl pages (and the links to other pages that are contained within them)? If search engines were written like other software components (e.g. database access components), the URL would just be a meaningless identifier (similar to a rowguid in a relational database) to them. If I were designing a database schema with something like the "friendly" URL above as a table's primary key, I would (quite correctly) get chewed out.
I said earlier "up to a point" because obviously, URLs can get out of hand. Here is an actual URL from Amazon.com that I don't think anyone in their right mind would consider "friendly":
It's a good point about how your putting unnecessary information in the URL.
Once the unique id 522466 is known - the rest is useless, so it purely serves to make the URL look "nice" and provide the user with an idea as to what the page links to. But this creates another problem. Most sites do not "verify" that part of the URL, so you could put --
Yet it will still link to this post. You can see how this may cause more problems than they are worth because they could be used maliciously.
I feel Digg have taken the right approach to this. They do not use IDs in their URLs. Behind the scenes they get the ID from their database purely from the title given.
This, for me, is the perfect url. It gives me all the information I need to feel secure in clicking the link.
In fact, titles play such a huge role that, in the world of digg, people "blind digg" purely based on the fact that they like the title, or are interested in it. If your url looks interesting, you may very well be getting more traffic to your site. At the same time you will be making it more user friendly, prettier, and search engines will thank you. As far as I can see, friendly urls are win win for everyone.