Blogging

What are PermaLinks?

From several years back, since my first days of working with Wordpress, I’ve always heard the term permalink thrown around. The common understanding of a permalink is two-fold. The first and foremost aspect of a permalink, as it is commonly understood, is that it should be a permanent link. The idea at the time that permalinks were conceived began with the dilemma that your latest articles would appear on the front page of your blog only for a time, and as you continued to publish articles, the older articles would slide into an archival area. They could still be pulled up on a page of their own, but they no longer appeared on your front page. Consequently, it didn’t make any sense for one blogger to link to another blogger’s new articles by linking to the front page, because in a short time that link would no longer be valid. Most web-savvy individuals caught on to this very quickly, but for many people it was not so obvious. Generally speaking, if you clicked the title of an article, it would take you away from the front page, to a page which belonged exclusively to that article, and would, hypothetically, always belong to that article. That was the idea of the permalink, which was nothing more than an extra link, often right below the title, that led to the same place; the main difference being that this link usually said “permalink” outright. This blatant obviousness proved to be helpful in lowering the amount of broken links that occurred when older articles were archived.

Secondly, a permalink is supposed to be search engine friendly. Many blogs at were, and many more now are, database-driven websites that store their articles in databases, and those articles can be pulled up by referencing their database ID number in the URL. Wordpress, for example, uses URLs right out of the box that look something like

http://www.yourdomain.com/index.php?p=32

That last part of the address, “p=32“, is the reference to the article, or post, as they are often called. The problem with this type of address is that some search engines do not like that format, and they may refuse to spider your pages, or at least do a poor job of it. A search-engine friendly URL uses a technology called mod_rewrite to create a cleaner looking address using perhaps, for example, the name of the post with underscores in place of spaces, and perhaps the date of the post. So the final URL might look something like

http://www.yourdomain.com/2006/Feb/17/My_Article.html

You’ll notice that most of my links have a similar format, except they use categories instead of dates. So permalinks are very useful. If an article isn’t on my front page anymore, the permalink will always point to, for example,

http://tiltedsymmetry.com/Articles/Software-Reviews/Get-Eclipsed.html

But what happens if one day I decide I want to improve the structure of my site, and I decide that the Software Reviews category needs to be grouped under a general Software category? If I want to keep my permalinks in tact, I can’t do that, ever. Even if I was somehow able to contact all of the individuals who had linked to that article, I’ve still defeated the purpose of the permalink, which is to have a link to my article which will never be broken or change. I’m stuck with a tough choice; I either break my permalinks, or I stick with the site structure that I chose from the beginning.

I don’t know about you, but I don’t think I want to accept that. A permalink is not truly a permalink unless it really can’t be broken. Granted, any way you set it up, you can always break your links; if nothing else, you could take your site down, and presto, instant broken links all over the web. So by can’t, we’re not talking about impossibilities, but rather improbabilities. It’s not probable that I’m going to take my site down anytime soon; if it were, I wouldn’t have set it up in the first place. It is, however, reasonable to assume that, down the road, I might like to reexamine my site, and I might realize that I could have laid it out better. Therefore, given the current definition of permalinks, it’s probable that they will break, or that I’ll be stuck with some poor decisions and no ability to improve.

Therefore, I propose that permalinks be redefined, or at least better defined. The part of the permalink’s definition that gets us into trouble is the search engine friendliness. This is what makes us refer to an article by it’s categorical structure or path, or by its date and name. But the one thing that will never change about an article (or at least there isn’t really ever any need to change it) is the article’s ID in the database. As I said before, this is the way that most systems refer to articles if search engine friendly links are not enabled, i.e. http://www.yourdomain.com/index.php?p=32. This address will always lead to the same article, no matter what changes you make to the category, date, or even the name of the article.

“Wait just a dog-gone minute,” you might say (and then you might strum your banjo a few times. And then, removing the wheat stem from your mouth, you might continue), “If you do it that way, it’s not search engine friendly anymore.” (I might wonder to myself how such a crazy red-neck knows so much about the internet. Nevertheless, I would respond.) So what? Why does it need to be? As we said before, the title is already linked to the article exactly like a permalink would be, so why do we need a second friendly link to exactly the same place? Let the title work for the search engines, and let the permalink work for our fellow bloggers, by being truly permanent. It will never change, no matter what we do to the structure of our site, it will always lead to the same article. Isn’t that the main goal here? If we can improve upon a permalink’s permanence, at such a small cost, I say we do it.

But the truth is, search engine friendliness doesn’t actually have to be thrown out, it just needs a new approach. You can still refer to an ID and have a search engine friendly link, just like this: http://www.yourdomain.com/32.html. You really don’t even have to put the “.html” on the end. The main thing that search engines don’t like is the question mark after the file name, followed by one or more variable declarations (e.g. “index.php?p=32“). Mod_rewrite can use IDs to make a friendly URL just as easily as it can use the categories, dates, and titles, and using the article’s ID gives us what, in my opinion, is truly what a permalink should be.

I’d really like to hear your thoughts on this. In the mean time, if you need to link to this article, just use my permalink.

Discussion

No comments for “What are PermaLinks?”

Post a comment