WordPress Permalink Customisation – Caution For Beginners

| Created: June 1st, 2007
WordPress Opinion 26 Comments
Editorial Note, 12 August 2011

So, some things have changed since 2007 – I now use the very same permalink structure I warn against below. There are a few reasons for this:

  1. WordPress now deals with permalink structure changes much better these days and will automatically 301 redirect the old URLs for you (in most cases).
  2. Even if WordPress didn’t do it automatically, I’m now comfortable setting up 301 redirect via .htaccess (which is what I do, because I don’t quite trust leaving it to WordPress).
  3. Having the category in the permalink does provide SEO benefits – I don’t care so much about getting the keywords in the URL (you can get that through postname), but I do like the benefits for the site structure (pseudo folders creating a silo structure).

There are still some problems with the /%category%/%postname%/ permalink structure: if you have a lot of pages (more than 50ish), this permalink structure can really slow down your site. Having said that, even this problem is likely to disappear, as it looks like they’ll change the way this works in WordPress 3.3.

This is only my second post since launching www.scratch99.com and I’ve already changed the Permalink structure! In this article, I examine why my original structure:

        /%category%/%postname%/

doesn’t work for me.

Inspiration

After installing WordPress, I was keen to customise it. Whilst searching for information, I found the WordPress Customisation Guide by Elliot Back, which introduced me to the concept of permalink customisation. Note that this is quite dated (October 2004) and the method described to set up permalinks has changed (WordPress now sets up .htaccess for you, rather than you needing to copy code to it).

For newcomers, permalinks are a permanent link to your posts. The default style of link for WordPress is http://www.yourdomain.com/?p=123, but you can change this to a variety of styles which are more user friendly, and more importantly, search engine friendly.

After reading Elliot’s article, I knew I wanted to change my permalink structure, but the article doesn’t give much information on what to change it to, so I went searching for further information.

This lead me to Fintan Darragh’s Ultimate WordPress SEO Tips, which recommends removing all non-essential tags from the permalink structure and replacing them with keyword rich tags such as %postname% and %category%, which makes your links more search engine friendly.

One argument against shortening the permalink structure, is that it increases the chance of duplicate post-slugs. Both Fintan’s article and another by Angsuman Chakraborty state that WordPress will create unique post-slugs (although I searched the WordPress site and couldn’t verify this).

Decision: /%category%/%postname%/

After searching some more, I found quite a few sites recommending /%category%/%postname%/ as the permalink structure.

This appealed to me. Date information is not particularly important for my blog, as it will be more category than date driven. Using /%category%/%postname%/ would ensure that only useful, keyword rich, information would be included in my links.

So my initial decision was made. I changed the permalink structure and published my first post.

Problem with using %category%

Having made the initial decision, I quickly decided that I’d made a mistake.

Why? My blog is new, so my categories are not yet settled. What I write about may change as my blog matures. I will probably need to reorganise my categories at some point in future, probably several times. Each time I change a category, it will break some of my permalinks, resulting in bookmarks, links to my stories, etc that no longer work.

There are redirect plugins that can help if you do change the permalink structure, but it is far simpler if you pick a suitable structure first and don’t change it.

Therefore, my caution for beginners: Having %category% in your permalink structure is not sensible, unless you are very sure that your categories won’t change.

It seems obvious in hindsight, but when you are busy trying to sort out your theme, the multitude of plugins you can use, etc, it’s easy to overlook this. I’d found a lot of information on the benefits of using category, but none that mentioned any potential problems.

My New Permalink Structure

I’d only made one post and it was just an introduction to my blog (not something people would link to or be particularly interested in). Therefore I decided to change my permalink structure before my second post. But to what?

My first thought was to just use /%postname%/. I have seen articles recommending this for ultimate SEO benefits, and lets face it, it is oh so web 2.0 (think Delicious for example).

However, there are potential problems with this approach, outlined on the WordPress Codex site, so it’s not worth risk.

Instead, I decided to put something short before %postname%. Although the date is not particularly important to me, I decided to use:

       /%year%/%monthnum%/%postname%/

Adding the year and month number wastes only a little space and the information is marginally useful.

Hopefully this will be the last change for me! What do you use for your permalinks? Are there any other traps for newcomers to be aware of?

26 responses on “WordPress Permalink Customisation – Caution For Beginners

  1. Opal: Vegan Momma

    I use the same thing I made the change almost two months ago. I’m not sure why it took me so long to do it. 🙂 I’m really enjoying your website.

  2. K-IntheHouse

    Stephen,

    I pretty much followed your thought process and ended up with your current structure.

    I think I’m going to have to figure out a way to tell Googlebot the difference between my archive pages (which I used exclude with ‘Disallow: /20*’) and my actual post pages.

    Or, I might change it to use /%tag%/%posturl%. Of course, I have the Dean’s Permalink Migration plugin installed so I won’t lose all the old links.

    I see that you are not using a robots.txt either.. check out comments 45,46,47 at SEO WordPress Plugin discussion.

    I might just create my own robots.txt instead of the plugin but the discussion there was an eye-opener.

    Sorry about the long comment. 🙂

  3. Stephen Cronin Post author

    K-IntheHouse,

    Long comments are great, especially when they really add something (as your does). I hadn’t heard about this problem, so thanks for bringing it to my attention. I’ve had a good look at the issue now.

    I had started thinking about solutions (even about writing a plugin to help), but re-reading the SEO WordPress Plugin post more closely, comment 48 seems to be saying that the plugin has been fixed to address this.

    It sounds like it no longer has /20* in robots.txt and uses noindex,nofollow on archive pages instead. If true, I think this means there is no problem with using year and monthname in the permalink structure.

    I’ll give it a try on my local site next chance I get and will adopt it on my live site if it has been fixed.

    By the way, I checked out your site and it’s great. Expect some comments from me soon!

  4. dockarl

    Hi Folks –

    I stumbled across this blog while doing my weekly check of referring sites. I’m the author of http://www.utheguru.com (mentioned in K-in-thehouse’s post above). Upon reading your comments Stephen, I figured I might take the time to make a post in case any of my insights (because I’ve learnt the hard way – by doing things wrong in the past) might help you.

    Ok.. so.. I’ve written an seo plugin that helps with duplicate content and making sure your site is well indexed, as mentioned by K-inthehouse – and along the way I’ve investigated loads of other plugins too.

    To start of with (sorry to plug my own blog) I’d consider it worthwhile for your readers to watch my video about the SEO aspects of Permalink Structure in WordPress, and it could be worthwhile to read my comments in the link referenced by k-inthehouse above – specifically, duplicate content can cause some issues for a blog. If you use %category you might end up with duplicate content issues if you choose to have a post in more than one category.

    Secondly, another thing worth considering is that if you change your permalink structure YOU MUST ensure that pages indexed under your old permalink structure are redirected using what is called a ‘301 redirect’. This tells search engines that your page has permanently moved to a new url. If you don’t redirect, you’re going to do two things:-

    1. People following links from other sites to your page are going to get a 404 (not found) error…
    2. Search engines following links from other sites are going to receive a 404 error.

    From an seo perspective, the second is the most important. What will essentially happen is that your pages will lose pagerank (and other signals like anchor text) from external links to your site. That can cause a big drop in search engine positioning, especially for established sites.

    My advice? If you are planning to change your permalink structure, consider installing something called Dean’s permalink Migration Plugin. Install it FIRST before you change your permalinks.

    What does it do? Well, it keeps a record of your pre-change url’s, and then once you make a change to your permalinks, it uses a 301 redirect to redirect users and search engines trying to access your old url’s to your new url’s – it’s a very elegant and well written plugin.

    If you happen to have already made your changes without realising this little gotcha, don’t worry – all is not lost. Just reverse your permalink changes, then install and activate the plugin, then reimplement your changes.

    My personal opinion for what is a good permalink structure? Don’t dilute it with the year and month or category – Google and other search engines already have a good idea of when your page first appeared, so those things just dilute the (very important) ranking signals in your url.

    I would strongly suggest just using %postname, and making sure that your postnames are relevant, concise and full of good keywords – for instance, the title of this page is great – wordpress permalink customisation caution for beginners – it’s concise, relatively short and contains the keywords folks are likely to be using if they’re considering changing their permalinks.

    Another long post.. sorry 🙂

    Cheers,

    doc (aka theDuck)

  5. Stephen Cronin Post author

    Hi Doc,

    Thanks for the comments. They are very useful. Excellent information!

    I’ve checked out your plugin and now have it installed – as per your comment 48 on your post, it plays fine with permalinks starting with month and date.

    I looked at the plugin code and couldn’t believe how short and simple it is – 21 lines of actual code! But there seems no doubt it is very important – almost all my pages are in Google’s supplemental list. Hopefully your plugin will fix this for me (though as you say on your site, it will take a while to take effect).

    I have no hesitation in recommending that anyone reading this should try your plugin.

    As for your comments: it seems that %category% is bad for more than one reason! I’m saying don’t use it because if you change your categories, you break your permalinks, you’re saying that it’s bad for SEO anyway (which I didn’t know)! So anyone reading this – don’t use category!!

    Using %postname% was going to be my first choice, but the WordPress Codex warns against this (link in 4th last paragraph my post above). The warning does mention version 1.2 which is old and many people seem to be using this structure now, so it’s probably fine – but I wish they’d remove this from their page, or at least clarify whether it’s no longer a problem.

    I’ve heard of Dean’s Permalink Migration Plugin, but one question: google’s robot ignores the 301 redirects right (in terms of duplicate content)? It must because there’s no content on the page right?

    Anyway, thanks for the plugin and the comment. I notice from your website that you’re in Brisbane, which is my home base (although I’m living in China at the moment). Small world. Though I never caught the Duckman…

  6. dockarl

    Using %postname% was going to be my first choice, but the WordPress Codex warns against this (link in 4th last paragraph my post above). The warning does mention version 1.2 which is old and many people seem to be using this structure now, so it’s probably fine – but I wish they’d remove this from their page, or at least clarify whether it’s no longer a problem.

    It’s no longer a problem – the problem they were referring to was fixed in 1.5, I’m quite sure.

    almost all my pages are in Google’s supplemental list.

    That’s quite possibly just because you’re a new blog – generally speaking the number of pages a site can sustain seems to be related (at least in a fuzzy way) to the pagerank of that site – certainly installing the plugin is not a bad idea because it will set you up for better indexing as you grow – but it might not (in your particular case) have an immediate effect simply because alot of your pages might not have enough pagerank to sustain them, but that will get better very quickly if you keep writing great articles 🙂

    I’ve heard of Dean’s Permalink Migration Plugin, but one question: google’s robot ignores the 301 redirects right (in terms of duplicate content)? It must because there’s no content on the page right?

    Not quite following you there Stephen – but I’ll have a go – basically when robots try to reach the non-existent page they’ll instead get a 301 signal, which will then ‘head them off at the pass’ and redirect them to the correct url. This is loads better than just giving them a 404 (not found) which is like a dead end.

    I notice from your website that you’re in Brisbane, which is my home base (although I’m living in China at the moment). Small world. Though I never caught the Duckman…

    Truly? Wow – it is a small world 🙂 Where abouts in China are you? I run a lingerie business and have travelled quite extensively though China – beautiful place, beautiful people.

    Cheers,

    doc

  7. Stephen Cronin Post author

    Thanks. I may give %postname% only a try then (with Dean’s Permalink Migration Plugin), although I’m a little hestitant to mess with it.

    Also thanks for the information about page rank with new blogs – I didn’t know any of that. I find your information very helpful and very clear.

    Regarding the 301 redirects, I think I answered my own question. Both the new and old URL will work when a 301 is in place. For a second I thought that might mean that there were two pages, creating duplicate content! Of course, I’m wrong. Although the two URLs work, there is only one page, therefore no duplicate content.

    I’m in Langfang, about an hour out of Beijing, teaching ICT to students who will study at Australian university when they finish. I love it here!

  8. Kirk M

    Hi Stephen,

    Thanks for stopping by the blog. Funny that you commented about the very thing I had been getting totally fed up about. As you probably know I used the same Permalink structure as you did and I had two glaring problems. First, if I accidentally published without selecting the correct category (we all do it) and then re-editing the post with the correct category just broke the original permalink which my Permalink Redirect (does the same thing as Dean’s permalink Migration plugin as I read it) couldn’t do a thing about. Also, as Doc says, it was a dupe content problem when I selected more than one category for a single post.

    It was your post and the subsequent comments that finally put the missing pices into place since I couldn’t figure out what was wrong. I knew I was missing something but I couldn’t figure out what.

    To make a long story short I changed my permalink structure as you did using /%year%/%monthnum%/%postname%/. The Permalink Redirect plugin takes care of the 301 redirects.

  9. Stephen Cronin Post author

    Hi Kirk,

    Your point about accidently publishing with the wrong category is one I hadn’t considered and adds more weight to the fact that using category really isn’t a good idea. You’re right, we’ll all do it at some point.

    I get a little frustrated that there are so many sites that recommend /%category%/%postname%/ and very few which mention the possible problems. It seems like there must be quite a few of us who experience the problems.

    Anyway, thanks for the great comment – my site is new, has low traffic and few comments, so I’m thrilled that this post has been getting meaningful comments which really add to the discussion. Nice blog by the way.

  10. Kristie

    I seem to publish my posts without clicking on the correct category at least half the time, especially when I’m in a hurry. I didn’t think things this far through when I set up my permalink structure, but I’m glad I used /%postname%/ as a sort of accident…. Interesting to read the logic and thoughts behind all of this from the other commenters.

  11. Stephen Cronin Post author

    Kristie, good choice, even if it was an accident! In hindsight, I should have used that, but the WordPress site talked about a bug with just using postname – but it seems that was fixed long before I made my choice!

  12. Katie

    There is so much to read and consider before doing surgery on your permalinks. I thought I had reviewed just enough material and then I jumped in…

    Wish I had seen this post (the interesting comment/discussion) first.

    I want to be emphatic on that point for anyone who stumbles on your blog, Stephen. For those who are a bit code-challenged like me, we experience great elation when the plugin or .htaccess file we have just added simply works.

    I should have reviewed the procedure a little longer (I’m using %category%,/%postname% and from the consensus here, it looks like that was mistake.

    Thanks for providing a place for people to hash this matter out.

  13. Stephen Cronin Post author

    Hi Katie,

    I find a lot of people recommend using category in the permalink, but almost no one warns of the potential pitfalls. At the same time I’ve found quite a few people who learn about the pitfalls the hard way. These days, if I find a site recommending category, I leave a comment about the pitfalls.

    That said, many people do use category and don’t find it a problem. I’ve checked your blog (which is pretty good by the way!) and your categories seem fairly settled. This is more of a problem with new blog which will be changing their categories as they grow.

    So hopefully you won’t need to change your categories. You just need to be really careful not to choose the wrong category when posting. If you’re careful, then you shouldn’t have a problem at all.

  14. Katie

    Stephen, thank you for the feedback. I added a comment with a link back to Scratch the Surface hoping to steer others to your fine discussion over here. I appreciate your help!

  15. Stephen Cronin Post author

    Katie, Thanks very much for the link back. You didn’t have to, so it’s greatly appreciated.

  16. Eric@Software Tutorials

    I agree you should definitely change your permalink structure to postname however I don’t use any other structure basicaly becasue my blog does not have have categories but instead i use link categories.

  17. James@Digital Video Editing

    Changing your permalink structure to postname will highly increase your serp rankings.
    Nice post.

    Cheers
    James

  18. m coles@st albans office space

    I use just /postname/ at my blog and I’ve never had any problems (in fact, the problem you link to at the WP site now has a query as to whether this is even an issue in current versions of WP.) If you want to use the date as well, is it better to put this at the end, after /postname/ so the keywords are nearer the front of the URL?

  19. John @ Natural Personal Energy Technology

    Thanks Stephen.

    We’re moving from a flat html site to a wordpress blog platform and found it challenging to find clear information about how to place keywords into urls for better seo.

    Your post has given the clarity we needed to use /postname/ structure from day one.

    Thanks heaps!

    John

  20. Chloe Quadrant

    Cheers Stephen
    Just in the process of setting our blog up and decided on /%category%/%postname%.html but have changed to /%year%/%postname%.html after your advise. Changing the categories at a later date isn’t something I had even considered.

    Many Thanks for the good advise

    Chloe

  21. Mark@arcade games

    I am using /%category%/%postname%/ for my blogs. But I think that you are right and that it is better to not include the category in the url. For SEO purposes I might change the category name in the future and all the links would be dead.

  22. Betty@dutch webdesigner

    Thank you for this post. I’m just starting a blog and was wondering what to do about the permalink structure. After reading a few articles about it I ended here and i liked what i read. I think i’m going to go for the /%postname%/ only, since the difficulty in the current version of WordPress apparently is solved. I will test it thouroughly though to avoid problems in the future! Thanks! Betty

  23. Betty@graphic design the hague

    Okay i countered a problem using pretty permalinks in wordpress 2.7 . It seems it gives 404 pages when changed to just /%postname%/ I read many articles about it and tried some fixes but nothing helped. Is it better to wait using wp 2.7 until this bug is solved or does anyone have a solution?
    Best regards, Betty

  24. John@affiliate funnel system bonus

    Hey,

    I use the same permalink structure. It only makes sense to do it this way. I am still in the process of changing all my other blogs over. Still wondering how to change the permalink structure on a blogger blog though. Is is even possible?

  25. ROHITK@knowledge

    But I like the permanent link structure should be with date some think like
    /%year%/%monthnum%/%date/%postname%/
    /%date%/%monthnum%/%year/%postname%/
    Yes category (TAg) may change some times we can not put them on misc always.We have to create another tag or category for that….