Optimizing WordPress Permalinks

285609610 a4379d44fc m Optimizing WordPress Permalinks Permalinks 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).


Please also check out ManageWP, One dashboard to manage all WordPress sites.

Related Articles:


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

Comments:

46 Comments

  1. Ramit
    Sep 1st, 2009

    I use I use %category%/%postname%, for my posts and add keywords to my titles and it seems to work quite well.

  2. Madhuri Vats
    Aug 27th, 2009

    I am running the travel blog i.e. http://www.tourtravelagency.com and the Category section is like category/newcategoryname/postname.html but I don't want to add category before our category name. How to do it.

  3. Jerry
    Aug 20th, 2009

    In the WordPress codex they say:

    "Starting Permalinks with %category% is strongly not recommended for performance reasons."

    There are similar warnings for %postname% and a couple of others. Yet your recommendation (and some of their own examples) includes starting this way. Can you comment on the performance problem and whether the size of the blog or the number of categories is a factor?

  4. Andrew Bowers
    Aug 4th, 2009

    I have a url that uses wordpress version 2.8.2 which I have set up static pages for. I don't want to use it as a blog; just a stand alone website with a few pages.

    I want to set up the permlinks so that the URL shows the postname only on each page e.g as http:///%postname%/

    But, despite what you say, this doesn't work.

    I don't want to show the year, month ,day or category; just the url and postname.

    Does anybody know how I can set things up like this?

  5. HealthRose
    Jul 15th, 2009

    Hi,
    It's really very useful tip. I'm using it in my new health blog http://healthoutfit.com. Thanks for this useful tip.

  6. Tecnologia
    Jun 26th, 2009

    Please tell me, ¿What is the better /%postname%/ or /%postname%?, and ¿why?.

    Thank you very much.

  7. V.C
    May 12th, 2009

    Hi, nice post.
    I found your topic when I was looking for the way to optimize permalink in wordpress.
    I've wondering about it, so thank for writing.

  8. Ayush - SEO
    Apr 20th, 2009

    I have tried this Friendly URL and within 10 min it's start working. Thanks a lot!!

  9. Apr 14th, 2009

    or you can outsource the work to a freelance site, and hire someone to manually redirect it all for like 10 cents a link? :)

  10. Scooter
    Apr 14th, 2009

    Vladimir,

    thanks for that quick response! That's what I was afraid of. I considered using the 301 redirect, but we have too many posts to manually index.

    I may look into the idea of creating a pre-loader routine that checks the request for url structure, and does a lookup/redirect against the MySQL tables if it finds the old format.

    It's never easy, is it? :>

    Thanks again.

    s.

  11. Apr 14th, 2009

    No you can not use two concurrently (at least not without hacking)

    But you can use 301 redirect in your .htaccess file to redirect old structure to new one

  12. Scooter
    Apr 14th, 2009

    Anyone know if it's possible to use 2 Permalink structures concurrently? (Ugly & Pretty?)

    Going forward, we would lile to change from "Ugly" to "Pretty" to make the links a little more descriptive. However, when we tested the change, all the inbound links (Ugly format) from sites that have picked up our posts are broken. We have years worth of posts that still get linked to.

    Would hate to lose all those referrals just to make the switch.

    If anyone knows a workaround, would love to hear from you...

    Thanks!

  13. MistressVictoria
    Apr 8th, 2009

    I've tried category/postname, but none of the links will work and I don't know why. o_O;

    So until I figure out how to make them work, I have to leave it as the ugly default. =(

  14. shuigji
    Mar 25th, 2009

    go!

  15. alan
    Mar 19th, 2009

    Hello - am I right in thinking that when the permalinks are changed to (e.g.) /%post_id%-postname% , the "IfModule mod_rewrite.c" code that WordPress puts in .htaccess takes care of converting/diverting external links in the old format - i.e. "/?p=498" ?

    I've tried it on a duplicate blog I use for testing plugins/changes etc. (before going live on the main blog) and it all seems to work fine. Seems too easy... Anyone hit any problems other than here in the comments ?

  16. Mary
    Feb 9th, 2009

    Vladimir, would you please answer an SEO newbie question?

    I'm trying to build a SILO structures. Can I achieve SEO by setting up theme-related blogs each in its own directory on the same site? I would use regular HTML or PHP for the index page and their directory folders.

    Another alternative would be putting the related blogs in their own subdirectories. Would this be better for Google ranking?

    Mary

  17. Ian
    Feb 9th, 2009

    Vladimir

    This is a very interesting post. I tried inserting %category%/%postname% in Custom Structure for my client Hersey & Son and the URL extensions appeared exactly as I would wish them too. However, as you note in your Conclusions, it did mean that none of the posts appeared when clicked on thereafter, so I had to revert to the standard setting.

    I've about 30 posts written since June last year. How do I go about updating these so that when I update the settings next time my old posts remain available?

    Ian

  18. skinskin
    Jan 27th, 2009

    no need to
    "You only have to create at least 100 pages first in order to have three digits at the end :)"

    you can do like this:

    %postname%-00%post_id%

    cheers

  19. Stephanie
    Jan 21st, 2009

    Great tip - plus permalinks make the post look better, IMHO.

  20. Andrea Hill
    Jan 21st, 2009

    I use %category%/%postname%, and I also edit the automatically generated postname only to have keywords. For example, my last post was titled "Social Media Confession: I Follow Brands on Twitter" and was in the social media category. The permalink is http://www.afhill.com/blog/social-media/brands-on-twitter

  21. Jan 21st, 2009

    Keith you may want to take a look at this link

  22. Jan 20th, 2009

    Yes that's correct, why didn't I think of it first :)

  23. SE7EN
    Jan 20th, 2009

    You don't have to create 100 posts
    Just add "0" or "00" or any number :)
    %postname%-0%post_id%

    and if I don't misunderstood, the 3 digits can place anywhere in the URL.

  24. Sergej Müller
    Jan 20th, 2009

    I am your opinion. See also my article in German: http://playground.ebiene.de/933/optimaler-permalink-in-wordpress/

  25. Keith Collantine
    Jan 20th, 2009

    I set up permalinks to work on my site but some of my readers are complaining they don't work. However the links they are complaining are broken work when I try to look at them. It doesn't appear to be browser-related. Here's an example of what they've said:

    Curiously; the link says “http://www.f1fanatic.co.uk/?attachment_id=164xx”.
    Generally; the browser address reads: “http://www.f1fanatic.co.uk/2009/01/20/bmw-f109-unveiled-pictures-2009-f1-car-launches/bmw_f109-7/” or something like that. Never is the word “attachment” mentioned.

    The relevant thread is here: http://www.f1fanatic.co.uk/2009/01/19/2009-f1-car-comparisons-ferrari-mclaren-renault-williams-and-toyota/#comment-232906

    If you could offer any help I'd be very grateful!

Have your say

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

*
*

Subscribe without commenting

About

vladimir prelovac Vladimir Prelovac is CEO of Prelovac Media, a computer engineer by profession and an adventurer by state of mind. more +


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

Services

Manage multiple WordPress sites

Built for WordPress enthusiasts, ManageWP helps you manage all your WordPress sites from one central location.

Books

WordPress Plugin Devleopment Book Read my book WordPress Plugin Development: Beginner's Guide

Published by Packt Publishing, available online through Amazon.