One of the really nice and seo-friendly features of Wordpress is the ability to create a custom keyword-rich URL structure. Choosing the right permalink structure is a very important step when setting up a new blog, yet it is often overlooked.
Changing your permalink structure after you’ve written hundreds of posts (and after they’ve been indexed) is a pain and can cause you to lose search engine rankings (& traffic).
The default structure for Wordpress is:
domain.com/?p=15
where 15 is the post number. This is ugly, gives no indication what the post is about, and is not seo-friendly.
On the permalink settings page – Wordpress admin > Options > Permalinks – you can see 3 other structures: date & name based, numeric, and custom.
I would only use the date and named based option if your blog is meant to be only 1 post per day (such as “website of the day” or something similar) and the date of the post is important to the context of the blog. Otherwise, I would stay away from the date based structure.
The only time I’d recommend the numeric structure is if you think that your blog might someday get picked up by Google News. In that case either use the post number as the permalink
/%post_id%/
OR add it to the beginning or end of a custom postname URL
/%postname%-%post_id%
or
/%post_id%-%postname%
5/29/08 update: After having used the above formatting (id added to end or beginning, I would not recommend it. Use just the post id OR post name, don’t combine them).
I’ve seen a lot of bloggers recommend using the “/category/postname” structure
/%category%/%postname%/
but from experience, one potential issue to think about is if you ever want to reorganize or edit your categories, you’ll need to redirect your existing posts to the new category structure. I recommend avoiding this situation – redirecting tons of posts can be a pain.
Therefore this is the permalink structure I recommend 9 times out of 10
/%postname%/
A small thing to note: you can use a trailing slash at the end or you can leave it off. Personally I think it looks nicer with it off, however, it does give a very tiny boost to your webserver’s performance and is technically the right way to specify URL’s.
I would recommend picking a permalink structure before starting a blog and sticking with it. If you ever do need to change structure – and you’re prepared to see a temporary hit in search engine rankings – use the permalink migration plugin (I’ve tested it and it works well).
This site runs on Thesis. Yours should too
Are you a blogger that doesn't understand a lot of PHP? Are you looking for a theme with Flexibility, Easy Customizations, Rock Solid SEO, and Outstanding Support?
If so Thesis is for you. Using Thesis you will have more control over layout and design than you ever thought possible. Simply point and click.
For more advanced users Thesis has an intelligent customization system that uses hooks. Using hooks you can use Thesis across all of your sites and never tell it was the same theme. Watch the Thesis Video Tour.


{ 2 trackbacks }
{ 18 comments… read them below or add one }
The “advanced permalik” plug in for WP it give you more options for permalinks and you can redirect your old links. thanks for your advices.
But by having a /%post_id%/%postname%/ will allow you to:
example.com/blog/182/
example.com/blog/182/welcome-to-hell/
it will still allow you to understand the content, and get to the same place in both examples =)
One minor change you might want to make, is to remove the trailing / and replace it with .html
This ensures that the URL will always be canonical, even if some blogger accidentally forgets to care about such things. While WordPress 2.3 forces all URLs to be canonical, this ensures people won’t screw up the link. It also tells the internet that the post is indeed a web page (which isn’t supposed to matter, unfortunately, it does in a lot of poorly-coded cases).
So, probably the most optimal is /%postname%-%post_id%.html
I disagree about the html thing – URLs are a lot friendlier without it (more user-friendly) – most new sites and web apps use the extensionless convention. But I suppose it’s a matter of preference.
Is it safe to modify my permalinks even if its a 2 year old blog?
@geri: I probably wouldn’t. You can but it’s a little risky for search engine rankings – if you do, expect some time to readjust and make sure you 301 everything properly (there are a few plugins for that) – or you can use something like this http://urbangiraffe.com/plugins/advanced-permalinks/
Just When I was thinking about such permalink structure, I found that it will be silly to have a post like http://yoursite/10-ways-to-do-anyting-15/ or http://yoursite/15-10-ways-to-do-anyting/ .
I would like to use /%postname ,it has a lot of advantages, like all your links will be in the first level after your domain name so it will have more importance for search engines than /%postname/ or any other permalink that ends with /%postname/ ,really it’s very good one. Nice post, Thanks a lot :)
Good call, bingo. I agree (after having done this myself)
i use /%postname%/ from recharch i got that i a lot of hits for using this Permalink Structure.
Trying to get /%postname%/ to work, have tried with and without the slash at the end but cant get the categories to work with this format. Its a new blog so wouldn’t have thought I would have issues with structure.
@Summer: what do you mean you can’t get the categories to work with the format? Can you elaborate?
At my SEO and Marketing blog I’m using the SEO mod for wordpress and for the Permalink structure I’m using, /%postname%/ and it seems to be working well!
Nice post I think for my new ERP Software Blog I will use /%postname%-%post_id%/
Does anyone else any suggestions regarding the user above that mentioend the .html part?
It may not be as SEO friendly as the above suggestions, but there is a performance issue relating to them.
From the wordpress codex:
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.
It might be a good idea to leave a unique number in your permalinks. I often have posts with the same name and it can be troublesome unless you leave in date or post_id information. I currently use: /%category%/%post_id/%postname%
i used %postname%
its worked….
Thanks to this post my friend, I just changed two of my site for their Permalink Structure. My site now loads faster and seems to be getting little bit more traffic that before. Thanks!
Has anyone ever heard of a wordpress theme not functioning any more if using anything other than the default permalink structure? I’m currently using a new theme with this very issue and it’s driving me mad.
Wordpress can be great, but 90% of the time there is some problem to address, whether it be dealing with a poorly coded and minimally tested theme, broken/out dated plugins, or trying to find a way around the wordpress limitations.
The real shocker was when I built my first wordpress site only to realize that over publishing the same post in too short of time (editing?!) will mark you as a ping-spammer. It sure would be nice if wordpress was more upfront about these type of things.
But anyway, if anyone can tell me why I can’t change the permalink structure without my site going crazy, that would be great. Thanks. I’ve already asked the theme author for help, but he’s clueless to why lol.
after some more experience with both types of permalink structures, I’d probably recommend going with /%postname%/ 90% of the time. I’d only include post-id if you are almost sure you’ll get into Google news (and know that you qualify).