The ShortURL WordPress plugin allows you to use your blog as your own URL shorterning service by implementing both the HTML and the HTTP Short URL Autodiscovery specifications. Your short URLs will be in the form of http://domain/-code.
The autodiscovery feature allows third-party services that honor it to use your own short URLs instead of generating new ones using services such as TinyURL, bit.ly, and others. This gives your posts and pages canonical short URLs that give you all SEO benefits and don’t leak traffic out to external domains and will prevent linkrot. The homepage short URLs is set to just http://domain/ as a unique feature.
The other great benefit of the ShortURL plugin is that the generated short URLs won’t break if you change the permalink structure of your blog or rename the slug of a particular post or page.
Due to the recent choice of both the microformats community and WordPress.com to use rel="shortlink" vs the alternative proposals, the ShortURL plugin is also using it now.
More on the topic:
DEMO: The short URL of this page is: http://nikolay.com/-1z
| Plugin Statistics | |
|---|---|
| Downloads: | 791 |
| Rating: | 3 stars by 2 users |
| Current Version: | 0.4.2 released 177 days ago |
Download Version 0.4.2 (requires WordPress 2.7 or later)
Please, visit the ShortURL at WordPress.org for more statistics and reviews!


I unzipped the packet, uploaded and activated the plugin. For the life of me, I can’t see the plugin anywhere in the settings, or where to actually use the plugin. Please help.
As of release 0.4.2, the plugin doesn’t have any custom settings — it just silently creates, handles, and exposes to services your short URLs without any bells and whistles.
If you want to promote your own short URLs, then you currently have only one option — to use either
the_shorturl(), orget_shorturl()function in your blog’s template.Now you need a short domain for your linking purposes. Ni.ck not existing/taken?
Thanks for that information. How do I go about getting the short url for my own use? For instance, if I wanted to post a short url in Twitter for one of my posts?
Which WordPress plugin for Twitter are you gonna use? Or are you doing it via TwitterFeed or FriendFeed external services?
I use HootSuite.
I activated the plugin and used both the_shorturl(), or get_shorturl() in this form
in my single.php template file and nothing showed up.Here’s the error message
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 10 in /wp-content/plugins/shorturl.php on line 87
I guess you have an older version of PHP. I’m gonna roll out a fix in a bit. I will ping you once it’s available. The new release will also add support for Tweetable, which is pretty decent and will automatically tweet your new posts using your own URL shortener.
I propose an option to show the short URL on the page. That way if anybody feels like sharing it they don’t have to have to go through the trouble of a shortener.
I added a quick and dirty function to the script if you’re interested, and could be an input that auto-selects text for the user for easy copy and pasting, but more than anything I just wanted to show demand for such functionality:
http://blowintopieces.com/blog/wp-content/uploads/2009/08/shorturl_showURLOnPage.patch
Cheerio.
I’m working on it realdy — it mimics WordPress.com’s interface.
Your plugin looks very interesting, will give it a try soon!
Just a question: Let’s pretend I’m running my Wordpress blog under http://www.myblog.com — would it be possible to use a second, shorter domain which also is mine (e.g. http://www.mybl.og) to show the shortened URLs of http://www.myblog.com?
Greetings from Germany,
Olli
Yes, that’s the idea I’m working on. When you use an alternative domain like mybl.og in your example, the dash/tilde won’t be necessary, which would make the short URLs even shorter.
Sounds very great! The top-notch would be a feature like already implemented in the “Synected” plugin: That visitors can generate their own short-url (optionally with an own string after the dash) — however: Let me know if you need some beta-testing, my site is still under heavy development so I’m always able to test things out.
Greetings,
Olli
Hey there — how’s development of your plugin working? Lookin’ forward to try it out!
Greetings,
Olli
I propose an option to show the short URL on the page. That way if anybody feels like sharing it they don’t have to have to go through the trouble of a shortener.
I added a quick and dirty function to the script if you’re interested, and could be an input that auto-selects text for the user for easy copy and pasting, but more than anything I just wanted to show demand for such functionality:
http://blowintopieces.com/blog/wp-content/uploads/2009/08/shorturl_showURLOnPage.patch
Cheerio.…
Hi Nikolai,
the redirect is working fine, but the_shorturl() or get_shorturl() aren’t. I’ve found that it’s because of a var name in line 15 (should read $id, not $post_id) and now it’s working ok.
Thanks a lot for the plugin, it solves perfectly a problem I had with twitter and external shorteners.
Also, a 301 (permanent redirect) seems more suitable that the wp_redirect default 302 (temporary redirect), and it’s the usual choice for all shorteners (you can see the different services choices here: http://searchengineland.com/analysis-which-url-shortening-service-should-you-use-17204).
Thanks for the suggestions! Expect the new version tomorrow.