AU Interactive

Choosing the Best URL Permalink Structure for your Wordpress Blog

Wordpress permalinksOne 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).

LGDA said,

November 21, 2007 @ 11:26 am

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.

lmjabreu said,

November 21, 2007 @ 12:10 pm

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 =)

Christopher Price said,

December 30, 2007 @ 7:07 am

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

Markus said,

December 30, 2007 @ 11:24 am

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.

Setting up a WordPress blog | .EDU Guru said,

January 11, 2008 @ 4:53 pm

[...] structure.  There are many discussions about the best way to do this.  You can read about it here, here, here, and finally this one has a few tips from the infamous Matt Cutts.   I’ll let you [...]

geri said,

March 19, 2008 @ 8:50 pm

Is it safe to modify my permalinks even if its a 2 year old blog?

Markus said,

March 20, 2008 @ 1:22 am

@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/

bingorabbit said,

May 29, 2008 @ 3:28 pm

OR (even better) add it to the beginning or end of a custom postname URL

/%postname%-%post_id%
or
/%post_id%-%postname%

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 :)

Markus said,

May 29, 2008 @ 4:38 pm

Good call, bingo. I agree (after having done this myself)

Bytetips said,

August 31, 2008 @ 11:39 am

i use /%postname%/ from recharch i got that i a lot of hits for using this Permalink Structure.

Summer said,

November 7, 2008 @ 3:54 am

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.

Markus said,

November 7, 2008 @ 11:09 am

@Summer: what do you mean you can’t get the categories to work with the format? Can you elaborate?

bbrian017 said,

January 1, 2009 @ 12:53 am

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?

Markus said,

January 6, 2009 @ 7:43 pm

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).

Gary said,

April 15, 2009 @ 5:27 am

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.

V.C said,

June 12, 2009 @ 7:36 pm

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%

Leave a Comment