Don't Devalue the Address Bar

I was reading an interesting entry in Rocky Lhotka's blog when something in the url caught my eye:


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2004/09/dont-devalue-the-address-bar.html

Simple URLs are great when your content is organized hierarchically and your URLs are hackable. If you hack

hurricane.ivan/index.html

off of the cnn.com URL,

<a href="http://www.cnn.com/2004/WEATHER/09/11/">http://www.cnn.com/2004/WEATHER/09/11/</a>

you might expect to find weather information for September 11, 2004. However, neither the cnn.com URL nor the techreport.com URL are hackable. Not great examples.

If your URLs aren’t hackable, there isn’t much point in making them simple, unless maybe you’re storing or exchanging them without metadata.

One could make a fairly strong argument that URLs really don’t matter anymore. How does most of the net population find things? Google. Does the URL matter when they use a bookmark or favorite? Nope.

“You’re as lazy as the ones you critizise.”

That’s true! Unfortunately I don’t have time to retrofit a bunch of PERL code into Movable Type to do something like…

http://www.codinghorror.com/blog/DontDevalueTheAddressBar.htm

… but you’re right. If this was an ASP.NET codebase, I probably would do that.

cnn.com’s URL looks like it’s more for cosmetics than actual function. I know that when I have that URL in my address bar that I’m looking at September 11th, 2004 weather information.

Simple URLS are also easier to remember. You don’t always have your favorites or bookmarks handy (though things like furl make this easier). That’s why those URL shrink sites are more popular. They take an insanely long and complex URL and shorten it into something that’s somewhat easier to remember.

hey man, first check the url of YOUR post:

http://www.codinghorror.com/blog/archives/000093.html

why can’t it be:

http://www.codinghorror.com/DontDevalueAddressBar.htm

??? You’re as lazy as the ones you critizise.

Herersquo;s an effective piece on this subject: http://www.w3.org/QA/Tips/uri-choose

Supposedly, a good URL with words separated by hyphens can help out a page’s ranking in Google. Also, when you’re looking at your web site statistics, it’s a whole lot easier to identify the articles that people are looking at.

Server.Transfer ; not Response.Redirect. Server.Transfer doesn’t send the browser anywhere so the URL is not modified.

I’ve found adding a GUID helpful to break caches… sometimes it seems to be the only way.

Luckily you don’t have to. Check out your “Weblog Config” - “Archive Files” page. My settings:

Individual: daily/$MTEntryDate format="%Y/%m/%d/"$$MTEntryTitle dirify=“1”$.html
Daily: daily/$MTArchiveDate format="%Y/%m/%d/index.html"$
Monthly: daily/$MTArchiveDate format="%Y/%m/index.html"$

That way the title is part of the URL (which is good for Google anyway), and truncating the URL works entirely as expected. Not too terribly difficult.

The “URL Rewriting” link is broken.

Supposedly, a good URL with words separated by hyphens can help out a page’s ranking in Google. Also, when you’re looking at your web site statistics, it’s a whole lot easier to identify the articles that people are looking at.
http://stroybalans.ru/

Your favorite for 404 errors is to redirect? So I lose the url I typed? So… if I had a typo I’m out of luck? That’s not very address bar friendly is it?