Optimizing WordPress Permalinks

GuidepostPermalinks were invented to make the URLs permanent and also more easier to remember.

WordPress blogs by default use dynamic URL structure, in the form of http://mysite.com/?p=344. This is dynamic as the page is retrieved using the number parameter which changes for every page.

Using permalinks, the previous URL becomes something like http://mysite.com/cooking-tips-tricks.

Why use permalinks?

Besides being easier to remember and use, permalinks can have positive impact on your search engine rankings.

It is believed that Google ranks pages based on appearance of keywords in the URL, among other factors. You can see a hint confirming the theory in the actual search results page, as all keywords appearing in the URL will be highlighted as well.

wordpress page loading time google search 1232447705408 Optimizing WordPress Permalinks

Setting up Permalink structure

Permalinks are edited in Settings->Permalinks screen, and best results are made if you enableĀ  "Custom structure". Custom means you can define permalink structure by using one of many permalink tags. Most useful are %postname% (title of the post), %post_id% (id of the post) and %category% (post category, if in multiple categories first created category will be used).

Most basic usage is only having %postname% tag and as an example you can see urls on my site which are using this structure.

Recently I am more inclined to think that usingĀ  %category%/%postname% may yield you better results if category names contain keywords you want to rank for.

Setting permalinks for Google News

If you want to list your site in Google News, one of the requirements is to have at least three digit identifier at the end of every URL.

This is easily accomplished using %postname%-%post_id% structure, which will append post ID to the end of url so it becomes http://mysite.com/cooking-tips-tricks-344. You only have to create at least 100 pages first in order to have three digits at the end :)

Conclusion

Since permalinks cost you nothing to set up, there is no reason not to use them. This should be the first step you do when you install a WordPress blog as changing permalinks at a later time requires more work (you will have all incoming links to your old urls).

Continue reading:


Posted in: SEO, WordPress
TAGS:, , , , , , , , , , , , , , , , , , , , , ,
leave a comment.

33 Comments

  1. ilya
    Oct 17th, 2009

    Hi Vladimir

    I've just created my blog and am learning wordpress stuff now. Very interesting reading, thanks.

    On the wordpress website they say "For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields." which basically makes sense as database requests can be slower. Another contra - you can experience issues accessing wp-admin when set up permalinks as %postname%.

    Do you experience any of those issues?

    To avoid this I have set up permalinks as /%post_id%/%postname%/. I would assume this is the highest performance option and do not let the post name be too far from the web-site address.

    I didn't know about google news + page_id - thanks for that. "Three digit issue" is easily resolved by setting last post id to 100 in wp_posts table. That's what I did after reading your guidelines. There can be only one issue: you may lose your revisions, post_parent also needs to be changed.

    To compy with google news I will have to use /%post_id%/%postname%-%post_id/ which is a bit weird but who cares about links?

    • Oct 17th, 2009

      Performance issues are noticeable only on high volumes of traffic, so usually its nothing to worry about. And I believe google news does not require three digits anymore.

      • ilya
        Oct 18th, 2009

        they do. after reading your post i checked the google's manual for news publishers

      • Garrison
        2 weeks ago

        I think this is really bad advice because what happens when:

        a) Your site gains high traffic, and;
        b) Has hundreds of posts

        Everyone has the ambition to create popular websites so your advice is not scaleable.

        There seems to be an ironic conflict here e.g. on the one hand you're advocating a structure of %category%/%postname% which will help SEO and help yield high traffic; yet that high traffic (combined with hundreds of posts) could lead to chronic performance issues because the URL structure requires many queries, many more than is necessary (or recommended)

        • 2 weeks ago

          The advice here is aimed at SEO. However regarding WP performance we run the same setup on GeekWithLaptop.com a Wordpress site with tens of thousands of posts and huge traffic without any problems even when multiple digg front pages are hit in the same day.

  2. AuGusTin
    Oct 2nd, 2009

    Thanks for your well infomation. I have another issue, I have other folder name "gallery" which need to be ignored from .htaccess. How do I write the rule?

    Thanks for advance.

  3. Manpreet
    Sep 29th, 2009

    Hi.

    Thanks for the nice post.

    I have installed a wordpress blog on IIS. When using permalinks, an index.php appears in the URL. Now my URL becomes:
    http://www.mydomain.com/blog/index.php/my-post-title/

    Is this index.php harmful from seo point of view? what is the maximum limit of slashes in a URL for better SEO?

    Is there any easy solutions to my problem.

    Sorry for so many questions. Thanks for your precious time.

    Thanks,

    Manpreet.

  4. UB
    Sep 11th, 2009

    Thanks for the info, I will update my blog with the settings.

Have your say

Your email is never published nor shared. Required fields are marked *

*
*

This site rewards regular commentators with do-follows links to their site.

Subscribe without commenting

About Vladimir

vladimir prelovac Hi! My name is Vladimir Prelovac. I am a computer engineer by profession and an adventurer by state of mind.

"I would love to change the world, I just don't have the source code yet."

Books by Vladimir

WordPress Plugin Devleopment Book WordPress Plugin Development: Beginner's Guide

Published by Packt Publishing, available online through Amazon. Click the image for more information.

Consulting Services

Professional WordPress solutions based on custom developed plugins and themes

Expert on-site WordPress SEO consulting and an 'out-of-the-box thinking' approach to problems