Web Design that is neat.

Your site may validate, but what about your existence?


The ultimate, and coolest permalink structure!

January 8th, 2008

What a heck of a topic those permalinks are. Who knew that something designed to make your life and your user’s simpler could have so much controversy behind it. What is the best permalink structure? Is it a case by case basis, or is there a holy grail of clean-URL’s? Luckily for you, I decided to dig a little deeper, and probably too deep because it got my head hurting a little.

First off I would recommend you read up on using permalinks, specifically with WordPress as I will be focusing on their blog installation because that is what I use here!

To let the cat out of the bag early on I will let it be known that I use the category/post-name method as you can clearly see in the address bar. I decided to go this route for a few reasons which I have broken down for you below.

It adds meaning to post names

From a usability, and SEO standpoint why not add descriptive keywords wherever you can, especially in high real estate locations such as the address bar, and title tag? If you have a post for example named “I ate the worm!” in a more common permalink structure such as “www.yourBlog.com/i-ate-the-worm” or “www.yourBlog.com/2007/12/20/i-ate-the-worm” would it be safe to say one might assume the post to be about drinking tequila? Probably so, since the preceding information gives us nothing but a date. What if the post is actually about fishing written in the third person from a fishes point of view? Now take for example the same post written in the category/post-name method.

www.yourBlog.com/blog/fishing/i-ate-the-worm

Now we can clearly decipher that this post is about fishing and not drinking alcohol, can’t we? I know it is good practice to give your posts descriptive titles to begin with, but sometimes it is more fun and nice to have that literary freedom to name it what you want.

Some people believe that it is easier to alter a year/month/day/post-name url to get back to a desired post, which might be true, as a user can just guess around the day until they get to it. I personally do not care when a post was written right off the bat, as long as the information contained within it is what I am looking for. I would rather have my user read a url and say “ok this makes sense to me” rather than “ok, this was written in April”. There is a reason we give our posts timestamps, and that is for a user to see when a post was written if they so wish to know.

Does Google see dates in urls?

No. Even if Google tried to make sense of a year/month/day/post-name url who is to say that “2007/04/15″ means “April, 15 2007″? Couldn’t it also be referencing another taxonomy for a product or service? For instance “store-number/aisle/bin”? It doesn’t matter what numbers are there, it is meaningless and actually might hurt your performance. Wouldn’t you as a user want the latest information on a given topic? Of course, so why let people know you are a slacker and haven’t updated your site in ages?!?

You have duplicate content…shame on you!

WordPress comes with the option to include multiple categories for each post, however in doing so it duplicates your content for each category, this is as you might have guessed not such a good thing from an SEO standpoint. In fact duplicate content can actually lower your page rank, which is yet again, not even at a little bit of a good thing. WordPress will select the category with the lowest id applied to it to be shown in the url for posts with multiple categories.

Tags to the rescue

If you have chosen to go with category/post-name method let me fill you in a little tip to help avoid duplicate content. Give your posts one category, and load it up with tags. For example:

Suppose you have just finished up a master of a post about your bowling adventure last night where you over-hand pitched a duck pin ball at someone and got kicked out…

www.yourBlog.com/blog/bowling/i-need-to-stop-drinking

You gave your post a specific category and you felt like being nice to your users so you also included a pretty descriptive title. We can now go ahead and add in tags about the more detailed events of the night such as, “beer, fights, hangover, hot dogs” and so on until you are satisfied (not too many though).

This is perfect, since we do not have to worry about losing page rank due to duplicate content (because of the multiple category issue) and we still have a user friendly, clean url to come home to. Excellent.

Have your cake and eat it too

Again, some of you might be asking why if you can add your post to multiple categories, wouldn’t you want to? After all, would it not make sense to have our bowling adventure also included in “hobbies, drinking, and sports” categories? Sure it would, and you can do it that way, however it is not advised because of the duplicate content issue surrounding this method. For example:

Visiting our bowling post filed under multiple categories could be followed by…

  • www.yourBlog.com/blog/bowling/i-need-to-stop-drinking
  • www.yourBlog.com/blog/hobbies/i-need-to-stop-drinking
  • www.yourBlog.com/blog/drinking/i-need-to-stop-drinking
  • www.yourBlog.com/blog/sports/i-need-to-stop-drinking

You can avoid all of this if you use a date based permalink structure. It all comes down to whatever you feel makes the most sense to your, and what you think will make the most sense to your users.

You gotta keep ‘em seperated

You may have noticed from all my examples that I showed in my way of doing i, I included in the url “blog” as part of the string. This is good practice, and if you are thinking about starting up a new blog, I would suggest in doing so for a few reasons.

First and foremost it allows you to keep the content of your site general in nature, so there will be no confusion which part of the site your user is viewing. There should not be any question to a user after looking at the address bar if they are viewing a post or a page. They might not need to know the difference, but suppose it is important that they do. For example:

A page describing your company and what you do, with mostly static content might look like this

www.yourBlog.com/about-us

A blog posting describing what it is you do could also be called something similar

www.yourBlog.com/about-our-company

See how it can get confusing? Wouldn’t it make much more sense to keep them separate?

www.youBlog.com/about-us

and

www.yourBlog.com/blog/about-our-company

Now there should be less guessing about where this information fits in with your site. You do not have to follow this rule, but it will however allow for greater scalability down the road if you ever want to go that route.

Let me know what you do on your site, and your feelings. Please feel free to tell me I am wrong, just tell me why, so we can all benefit from your input.

2 Responses to “The ultimate, and coolest permalink structure!”

  1. #1 Vicky says...

    One of the best articles I’ve seen. It explains things simply and clearly to everyone interested in permalinks for Wordpress.
    Your content is well formed, too, so a real pleasure to read.
    Beautiful site. Love it!

    • Posted on February 29th, 2008 at 1:51 am
    • Edit your comment
  2. #2 Matt says...

    Hey, thanks Vicky!

    Yeah, I was at your site the other day. Love it. Awesome work, and I already said it there, but good job with the permalinks.

    Thanks for stopping by, and don’t be a stranger.

    • Posted on February 29th, 2008 at 11:38 am
    • Edit your comment

Tell us how you really feel.