Considering Permalink Structure

By Leora Wenger, September 23, 2009 3:53 am

One of the first steps one should take in setting up a WordPress site (or a Drupal site) is set the permalink structure. (Here’s the Wikipedia explanation of permalinks).

The default structure of a WordPress permalink is http://www.yourdomain.com/?p=1234 -not the prettiest url, nor does it have any keywords that a search engine might like.

Here’s a screenshot of how permalink choices look in WordPress Admin:
permalinks

So, what to choose, what to choose. If your site does well with having dates of posts, you might want to use the Month and Date choice or the Year and Month choice that adds the post name so the link at least looks like it makes sense to a human. And the search engine can pick up any keywords in the post name.

Many SEO posts have suggested using: “%category% %post-name%” – the permalink would have the name of the category, followed by the name of the post. This sounds great for picking up keywords from a link, and the whole link is meaningful to a user. Furthermore, one doesn’t have the problem of an old date appearing in a link thus making it seem like the post is no longer relevant.

So, what is the problem with using http://example.com/category/post-name/ or http://example.com/post-name/ ? It turns out that because there is no numeric field first in the permalink, WordPress has to do a lot more behind the scenes work to look up those posts. Here is the post that first alerted me to the problem with non-numeric permalinks. Why believe that expert? Because he has the WordPress Codex page for permalinks on his side:

For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to start your permalink structure with a numeric field, such as the year or post ID.

So is this really a reason to avoid http://example.com/post-name/ ? If you go back to Scott’s post that is entitled
Many SEO Experts Give Wrong Advice Regarding WordPress Permalinks
, please note these two comments:

Joost de Valk Says:
Posted: June 10th, 2009 at 2:33 pm

“The system isn’t bullet proof, but it’s being worked on, it should detect collisions like that when a post is made, and prevent them automatically, however, very few people actually have that issue.

I still think that performance is something that we should handle within WP, and not go for sub par solutions just because WP isn’t able to handle it. WP is the best optimized system out there, and I’ll fight till my last day to keep it like that”

and

graywolf Says:
Posted: June 11th, 2009 at 10:30 am

using years/month/date is silly, it makes your posts seem dated when they don’t have to.

Using WP Cache you can minimize so many of the performance issues it absolutely justifies having the KWD in the URL. Additionally if you do it “right” you can use the post title, page title URL KWD’s to capture alternate singular plural versions.

it’s your blog so do what you want but i’m going to keep on doing “wrong”

Here are two experts (see Joost’s site http://yoast.com/ and Graywolf’s blog Graywolf’s SEO Blog) that say the system may need fixing, but it is not worthwhile to have numbers in the permalink just because the technology is not yet up to par. In fact, Graywolf implies that WP Cache may minimize many of these performance problems.

Conclusion?

  • If you don’t think your site is going to get really big with lots of posts, you might as well go with http://example.com/category/post-name/ or http://example.com/post-name/
  • If you think dating your posts will fit in with the nature of your site, then choose a date option.
  • If you really want to have http://example.com/post-name/, you can bank on the fact that few have had these problems and caching may minimize the performance issues.
  • If you like to err on the side of caution and don’t want dates, you can use http://example.com/post-id/post-name/.

In general, make your choice, move forward, and keep reading!

More reading on permalink choice:

Popularity: 3% [?]

8 Responses to “Considering Permalink Structure”

  1. For CookingManager.Com, I use post-name/cookingmanager.com. For AMotherInIsrael.com, I use post-name/date/amotherinisrael.com. I am not sure I made the right decision about the date, though.

  2. leora says:

    Hannah, thanks for the comment. I wouldn’t worry about using the date on your A Mother in Israel blog. You might want to read about duplicate posts when you use post-name alone. If you put your site in Google Webmasters, you can see whether Google is penalizing you for any duplicate posts. But worrying about duplicate content in itself may not be a big deal – spend a little time on this, but not a lot.

  3. It sounds like this issue boils down to if you think you’ll have so many pages that you’ll bloat the WP database, and that you’ll start to forget what you posted on and start to label your posts with duplicate titles from 2 years back.

    I could see this happening if you posted every day for months on end. In this case your visitors might appreciate having your posts referenced with the date in the URL.

    Otherwise it does seem like a non-issue. To my mind a clean, concise URL with your keyword in it for that post will always outweigh any possible problems with WP.

    • Leora Wenger says:

      Yes, I agree, in retrospect it is a non-issue, though the reason isn’t as you stated(if you name a post with same name, it will give the permalink a 1 or 2 or 3), but because the database query issue of difficulty with non-numeric posts will probably be fixed at some point in the future. Feel free to name your posts with postname, if you think that is the best way for your use of WordPress.

  4. best seo says:

    look, I don’t think it makes any difference the url structure. the url is parsed anyway and it doesn’t matter the position of whatever character within the request. if we have a “pretty url”, the relevant parts are rewritten on .htaccess file and sent to script, where regardless of their position are processed quasi simultaneously (filtered and then passed to db queries)
    best seo´s last blog ..SEO Turns to SO

  5. Sms lån says:

    I always use /%category%/%postname% and that has never caused me any problems, either with performance or duplicate titles. I mean, how many bloggers has blogs with 1k posts/pages?

Leave a Reply

CommentLuv Enabled