The Best WordPress Permalink Structure For Scaling, Performance and SEO

July 30, 2010  | 
23 Comments

We usually don’t think too much about permalinks – just set them and go. However, this can prove to be quite an ordeal later when you have hundreds of posts and pages and realize that you want to change your permalink structure. Did you know a bad permalink structure can have a significant influence on the performance of your WordPress site? Before you get too far down the road, it’s a good idea to do a little research. We’ve prepared some bite-sized bits for your consideration in selecting a permalink structure that will serve your site as it grows.

If you’re new to WordPress permalinks, they are the permanent URLs to your individual posts and categories. You can change the settings at Dashboard >> Settings >> Permalinks.

WordPress Permalinks: What NOT to Do

This is a very important and often-ignored bit 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.

So, what does this mean for the ubiquitous /%category%/%postname% recommendation that you see everywhere for SEO? It’s bad for performance. That also goes for %postname% by itself. The reason is because WordPress has to spend extra time trying to distinguish posts from pages and will then have to generate unique rules for each page in order to differentiate them. This kind of permalink structure can cause timeouts and sluggishness and is not recommended. For more information on this I highly recommend Otto’s article: Category in Permalinks Considered Harmful

Permalinks Structures For Scaling and Performance

I know when approaching permalinks for the first time there seem to be far too many options, but some are better than others. If you want to ensure that your site can scale gracefully and stay speedy, here are a few rules to live by when selecting a permalink structure:

  • Do not start your permalink structure with the category, tag, author, or postname fields.
  • Don’t listen to permalink advice from SEO experts who know nothing about WordPress. Keep your site running fast and let the content speak for itself.
  • Select a structure that starts with a numeric field, such as the year or post ID.
  • Make sure to end your structure with either %post_id% or %postname% (e.g. /%year%/%monthnum%/%day%/%postname%/) so that each permalink points to an individual post.
  • Do not put your site url in the permalinks slot. You must use one of the structure tags, or a combination of tags only.

Permalinks and SEO

One of the best things you can do for SEO is to select a solid permalink structure and stick to it, so that you don’t end up orphaning the inbound links that you’ve been building.

Let’s say your site has hundreds of posts, some of which bring you approximately 20% to 30% of your new traffic. What happens to all of those links out there when you change your permalink structure? They lead to 404 pages, which can instantly turn visitors off. They don’t want to have to hunt. So if you do have to change your permalinks, obtain the help of a plugin to assist you in redirecting the old links to the new structure. This will ensure that you don’t completely invalidate all of your pages that have been indexed with search engines and the bookmarks and links people have made to point to your site.

Give a little thought to your permalinks before just pasting something in there. Read up on using permalinks in the codex. You’ll thank yourself later.

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

23 Responses to The Best WordPress Permalink Structure For Scaling, Performance and SEO

  1. I’ve read a lot about SEO and WordPress and I’ve actually wondered just how much use a lot of the SEO plugins are. I don’t use them on my site but google and Bing and the other search engines seem to be quite happy working their way through my blog. I’ve always used the year/month/day/post_name url structure because to me it just made sense. I might re-categorise posts but I don’t think I’ve ever changed the title of one after publishing it.

  2. Great tip Sarah, this is something I always struggled with. And I can tell you that having the category or tag in front of the post is a hassle when it comes to scaling or trying to change you site structure. Having the postid, is the best thing, because that will always remain the same. So in theory the postid would be better for SEO if you ever need to change your site structure and categories.

    Thanks,

  3. I guess you are all about the ‘do as I say, don’t do as I do’ type huh? :)

    Look at your own site. Maybe you need to take your own posts to heart, or maybe to config. :)

  4. That’s a great question J Gemini. What does WPMU not follow their own advice and use /%post_name%? as the permalink? I’d love to hear the logic behind it.

  5. Pingback: Using WordPress as a True CMS - WPMU.org – WordPress, Multisite and BuddyPress news, tips and resources

  6. So why don’t you have your permalink structure with a /%year%/%postname% format?

    Yours is /%postname%/

    Just curious :)

  7. I don’t know. I didn’t set this blog up :)

    • It has been a year since this post and still you are using postname as permalink structure. Is there a reason you have not changes the permalinks to the ones you recommend? Has postname structure affected your blog negatively?

  8. @ Sarah oh! lol

    But, by the way, I’ve been looking at how to properly set WP up for optimal results…and aside from the “self-professed” gurus, all the REAL people, who know anything, suggest /%year%/%postname% as the format.

    The reasons I’ve found are:

    1. The reason you stated above ;)
    2. Anyone who wishes to be involved with Google news must have at least 3 numbers in their url(that’s from Google).

    Also, on new sites(and this doesn’t affect page ranking or get you listed higher), it’s simply supposed to get your brand crawled faster for faster indexing:

    /%year%/%postname%.html

    That’s what I’ve learned so far anyway.

    Love your blog, keep it up :)

  9. Hi all – I’ve been searching for a way to undo what is a no-no…
    what do I do if I have entered my site url in the permalinks slot? how can I recover from this?

    all pages are showing up with the same content – which is based off the page I have set as a static page.

    any help would be greatly appreciated! thank you!

  10. Get the Redirection plugin for WordPress. Create a rule to redirect all yourdomain.com/post_name to whatever your new structure is. Should be fairly straight forward but you’ll have to figure out some regular expressions.

  11. thank you Robbie!

  12. I’m using WP as A CMS.
    I set a Static page as home.
    set Permalink Structure to: /%postname%/

    my pages address are like: mysite.com/page3
    my blog home is also mysite.com/blog

    The problem:
    I want individual blog post to be like this: mysite.com/blog/post5
    right now they are like this: mysite.com/post5

    how can I do so?

  13. Omid–

    Get a plugin like redirection and change your permalink strucutre to /blog/%post_name%/. Use redirection to catch all of your old posts at /%post_name%/ and redirect them to their new home at /blog/%post_name%/.

    I have the exact same setup on my site now (/blog/%post_name%/) and I’m going to be changing it to either /%post_id/%post_name%/ or /blog/%post_id/%post_name%/ in the near future.

  14. Pingback: Best WordPress permalink structure for SEO | WP Journo: WordPress CMS & Journalism

  15. Pingback: 11 Ways to Make Your WordPress Site Faster and Leaner - WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org

  16. Thanks but i want to make my url like this
    http://www.domain.com/read-post title

    tell me how to make this in wordpress blog ?

  17. thanaks for the info… keep blogging

  18. Good article. I think the one I typed up last night my expand on it.

    http://qkin.com/change-wordpress-permalink-structure/

  19. Pingback: WordPress Permalink Structure | AppThemes Docs

  20. Great article.
    I had made one mistake: in my custom permalink structure i had this: http://sitefdfd.com/sample-post/
    Is that a mistake, isn’t? I have only static pages…

  21. Hello,

    I can appreciate what you are saying in regards to using the permalink structure /%postname%/ and it affecting performance issues, however as Yoast has stated on his blog here: http://yoast.com/wordpress-seo-url-permalink/ performance issues with this type of url structure can be overcome with good WordPress hosting and a good cache plugin such as W3 Total Cache or WP Super Cache (I prefer the former) and is more ideal for optimizing a WP site for search. Or is he wrong? Thoughts?

  22. Pingback: How to SEO your WordPress Website Part 1: Tweaks and Plugins | EVE Milano

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting