Did You Know WordPress Has It’s Own URL-Shortener Built In?

Recently an email subscriber complained that I had sent out a newsletter containing links shortened via a URL shortner service.

There are a couple of reasons I did this. First if a URL is too long email programs break the links by wrapping. This means I get a lot of people saying the links don’t work. The second reason is in the past Aweber’s built-in click tracking shortened URLs have broken also when the URL contained non-standard stuff.

Of course the problem when people see a URL-shortened link is they don’t know if they can trust it. I have three solutions, and they are all easy to implement on WordPress.

  1. Shrink your URLs down as far as they will go – Instead of www.somedomain.com/category/year/month/day/post use a URL scheme like mydomain.com/post
  2. Use a redirect plugin such as gocodes to turn a long fancy URL into something like http://chrisg.com/recommends/hosting
  3. WordPress already provide you with pre-shortened URLs, you just need to know where to find them! :)


Yes, indeed. You already have access to short URLs without changing or adding anything.

If you go into your control panel and look at editing your post, you will see an article ID. Simply use that instead of the prettier and friendlier URL. Eg. http://f1ftw.com/?p=28 goes to http://f1ftw.com/fantasy-f1/vettel-takes-china/ (of course it helps when your domain is 5 characters not including the TLD).

Copy the number that comes after Post= - that's your post ID


  1. says


    thanks for the advice and notice. I didn’t know about this. I have heard some bloggers, etc. worrying about a web of broken urls – the domain name would fix that. what’s their beef anyhow, do you know?

  2. says

    Yes but of course! *slaps head* Just use WP default URLs – like they were before activating permalinks. Brilliant.

    Sometimes the answers to our questions are the most obvious (and simplest). Thanks Chris for the reminder

  3. says

    Thanks for the GoCodes mention. :)

    And if you go with the WP default p=123 method, you can shorten the URL down even more by editing your .htaccess file and redirecting example.org/123 to example.org?p=123.

  4. says

    A reminder to WordPress users that if you have a site with a lot of content, it is recommended that a number be in your pretty permalink to speed up the process of finding your post in the database. A pretty permalink like example.com/2009/post-title works better than example.com/post-title/, though the time delay is almost unmeasurable from what I understand. There’s been a lot of discussion about this recently in the WordPress Community.

    When you use a link shortening service, it goes out to the service and goes through their database to pull out the post set for that URL. This can take a little extra time to process the page, but it also can backfire if that link shortening services closes. I recommend using the default WordPress method per your examples, Chris, or sticking with one that has been around for a long time and has a lot of support from the community.

    Great suggestion, Chris.

  5. says

    Slightly OT, but what’s also annoying is when Twitter (web interface at least) automatically shortens longer URLs even when there’s room for them. Not sure what the threshold is; anyone know?

    I can imagine using one of my domain names and a shorter URL in this way, but it still being turned into a TinyURL by Twitter (none of my domain names are particularly short – at least 10-15 characters each not including TLDs)

  6. says

    That’s great if you want to take the time to look it up every time. Not to mention that you only want to know what happens with links that are native to your own domain. I set up a shortner and I like that it’s automatic with Tweetdeck for any link I paste in, and I can see how much it gets viewed.

Leave a Reply

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