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.
- 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
- Use a redirect plugin such as gocodes to turn a long fancy URL into something like http://chrisg.com/recommends/hosting
- WordPress already provide you with pre-shortened URLs, you just need to know where to find them! :)
Waaah?
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



By CMD posted on April 23, 2009 at 1:01 am
Want an avatar? Get a gravatar! • You can link to this comment
Chris,
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?
By Lynette Chandler posted on April 23, 2009 at 1:13 am
Want an avatar? Get a gravatar! • You can link to this comment
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
By Harsh Agrawal posted on April 23, 2009 at 1:18 am
Want an avatar? Get a gravatar! • You can link to this comment
That’s a nice find, but Still need to figure out how I can use for my affiliate links
By redwall_hp posted on April 23, 2009 at 1:26 am
Want an avatar? Get a gravatar! • You can link to this comment
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.
By John (Human3rror) posted on April 23, 2009 at 1:52 am
Want an avatar? Get a gravatar! • You can link to this comment
I wrote this just the other day!
same concept.
By Lorelle VanFossen posted on April 23, 2009 at 5:54 am
Want an avatar? Get a gravatar! • You can link to this comment
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-titleworks better thanexample.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.
By `rolandinsh` posted on April 23, 2009 at 12:39 pm
Want an avatar? Get a gravatar! • You can link to this comment
For short links in my blogs I’m using in footer of post my.domain.tld/?p=22 And using it for several “share services” or simply selectable input field
By Andy Merrett posted on April 23, 2009 at 1:21 pm
Want an avatar? Get a gravatar! • You can link to this comment
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)
By squareart posted on April 23, 2009 at 1:46 pm
Want an avatar? Get a gravatar! • You can link to this comment
Thanks for this, looking forward to trying out the GoCodes plugin.
By krishna posted on April 23, 2009 at 2:44 pm
Want an avatar? Get a gravatar! • You can link to this comment
This is a good find regarding the URL-shortener in WordPress. Thanks for sharing it here
By aks posted on December 11, 2009 at 11:02 am
Want an avatar? Get a gravatar! • You can link to this comment
wow never heard this thing. thanks for sharing.
By Jason Burns posted on December 16, 2010 at 9:36 pm
Want an avatar? Get a gravatar! • You can link to this comment
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.
By San Diego Bankruptcy Attorney posted on May 20, 2013 at 7:59 pm
Want an avatar? Get a gravatar! • You can link to this comment
I’m genuinely enjoyed your story here, I hope you don’t mind, I bookmarked it for you personally on http://www.blogherald.com/2009/04/23/did-you-know-wordpress-has-its-own-url-shortener-built-in/ to share with my company, relatives, and co-workers. Any way I hope you don’t mind I would like to share one thing with your fellow viewers in addition. Without a doubt, it’s somewhat off topic, however itis essential to me. I not too long ago had to document bankruptcy. I located this beneficial attorney in San Diego. Not only did he cease my wage garnishments, he forced the banks to reconsider my mortgage loan modification. I just wished to give a shout out to my new best close friend! So if you reside near San Diego head to this 1st rate law firm, just simply click on my name and you will see his cool online video. Thanks All over again for your great posting, keep up the great endeavours!