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 (even better) add it to the beginning or end of a custom postname URL

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

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/

Leave a Comment