WordPress offers you plenty of options for choosing a permalink structure for your blog. For instance, you can chose to have dates, post IDs, categories or even the name of the author in the pemalinks (short for permanent link).
The URL structure that you see on this blog uses the following custom format:
/%category%/%postname%/%post_id%/
So if I am writing an article on WordPress Tips under the Blogging category, the URL of that post will look something like this:
http://labnol.org/Blogging/WordPress-Tips/1234/
Here are some reasons why I chose such a permalink format:
#1. The URL structure is SEO-friendly and also looks clean in snippets that are displayed in search engine results pages.
#2. The structure doesn’t contain dates. I generally try to write “timeless” blog posts that should stay relevant for a longer period of time and hence skipped the date completely from the URL – the date is anyway displayed in blog articles and sometimes even in search snippets as in the above screenshot.
#3. Google News includes quite a few multi-author blogs in their index and one of their technical requirements says that all article URLs must contain a unique number. If in future, this blog grows and gets included into Google News, I won’t have to alter the permalink structure because there’s a unique number already in the URL – it’s called Post ID.
#4. Words in the URL are separated by hyphens and not underscores as suggested by Matt Cutts in one of the WordPress camps.
The Problem with this URL Structure
Now before you use a similar permalinks structure for your own blog, let me share a problem – this structure can make you site a little slow. That’s because WordPress will have to run some extra queries each time to figure out whether the URL matches a WordPress page or an individual post.
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).
They have raised a ticket for the above issue but it won’t be fixed until WordPress 3.0 so you are better off not using the structure that I am using.
What’s the Best Permalink Structure
If you are looking for performance, the best permalink structure would just have the /%post_id% in the URL. That’s however not very SEO-friendly so you may consider going for a structure like the one below (there’s no trailing slash).
/%post_id%/%postname%
I know you can change the permalink structure anytime (Tools -> Permalinks) and WordPress will do a 301 redirect from the old URLs to the new ones but that might push your site out of Google’s index for some time so there’s a bit of risk involved.
Find this article at: http://www.labnol.org/internet/wordpress-permalinks-structure/12633/


Reader Comments
Hi! Amit,
Good tip! I think a lot of people leave it at the strange and ugly URLs that most of the CMSs create by default. Apparently, the claim is that this is better for SEO as well. I have been using /%category%/%postname%.html as my permalink structure for a while.
Cheers…Kishore
Written by Kishore Bhargava on 02.01.10
Coincidentally, I made the change you suggest as an ideal permalink recently and did experience the downturn in traffic for about 2 weeks. It is slowly inching back up.
BTW will WordPress do the redirect automatically or do we have to use Redirect plugins or code it in the .htaccess? I am using the Permalink Redirect plugin right now so I guess, it works but wondering if it is redundant.
Written by Patrix on 02.01.10
Patrix – I am not sure if you really need a plugin to handle permalink changes because WordPress should do that by itself. The latest release, WordPress 2.7, also supports rel = canonical URLs so that’s another advantage.
Written by Amit on 02.01.10
Erm, the latest version of WordPress is 2.9.1.
Written by Ankur Banerjee on 02.01.10
Thanks. I’ve disabled my plugin and the redirects seem to work. I had enabled it long time back (before WP 2.7) to account for an earlier permalink structure and just stuck with it. For some odd reason specifying two old permalink structures broke my Pages so had to remove the older one.
Anyway, this is the post that made me change – link
How long does Google take to index the new URLs?
Written by Patrix on 02.01.10
I use permalink similar to the ones used here except for the post id. Ive thought about changing it but then, going out of google’s index would mean a lot of lost trafic. That is something I cant afford :(
Written by Alfred on 02.01.10
So, finally you answered my question ( link ). I was wondering why you have chosen a poor performance structure.
I am using permalink redirection plugin and it does not affect google juice because old permalinks are indexed with google and send the search to new permalinks.
Using postid in the starting of permalinks has many benifits (in addition to be database friendly).
Written by ePandit on 02.01.10
As a matter of fact, when I started out, I just copied your permalink structure. Thanks to the early clueless days ;)
Written by Arun Basil Lal on 02.01.10
Thanks Amit…A very time article since I’m setting up a blog!
It is surprising that the default permalink on wordpress doesn’t include the post name.
Written by Khetarpal on 02.01.10
Hi Amit.. I’ve been using /%postname%/%post_id% in all my sites for sometime. I did some research for a better permalink structure which supports SEO and does not impact my server memory much. I see this as a better tradeoff, if not ideal. I guess, Facebook Pages are also using the same structure.. Need your opinion on this.
Written by Nitin on 02.01.10
Hi Amit,
If you selected two categories, which one does it choose?
For better or worse, I add some posts to multiple categories. Should I stop doing this?
Thanks
Ivan
Written by Ivan Walsh on 02.02.10
This article discussed so many times on the web.But still it is a HOT Topic among bloggers.Still there is a confusion about the permalinks.I just have a single doubt.All of us know that Wordpress default permalink system is not good at all , it is not better for SEO at all, even then why don’t wordpress change it’s default permalink structure to the better appropriate SEO supported one???
Anyway thank you Amit sir.I am using
/%category%/%postname%/
permalink.Is it efficient in your view?
Written by Kishore Mylavarapu on 02.04.10
ohh, I am using /%postname%/%post_id%/ instead of /%post_id%/%postname%
Written by Rohit Langde on 02.05.10