Do you wish you could use a shorter domain name with your Pretty Links? Take the www out of the beginning of your Pretty Links? Is the WordPress portion of your website in a sub-directory and would like your Pretty Links to come from the top level of your domain name? Well, Pretty Link Pro can help you solve any of these problems to make your Pretty Links as short as possible.
So, granted, there are some small hurdles to get through initially but you'll find that it's quite easy to put your short links on another domain name and continue to manage them from your wordpress admin — even if your wordpress blog is in a subdirectory of your website.
Here's what you'll need to do to get a custom short link working:
- Register or select a short domain name — for example if my blog's domain name was example.com then you might try to register ex.com or something. If you're just trying to get your short links to be created from your top level domain or want to eliminate the “www” in your short links then you could just use http://example.com as your short domain instead of your blog's http://www.example.com/ or http://example.com/mycoolblog/ url.
- Set your short domain name to point at the top level of your website — Of course, if all you're trying to do is get the wordpress path removed from your domain name you can skip this step (sub directory installs) because your short domain is just your top-level website's domain name. But this is probably the trickiest part for most people … because they think they can just setup a domain name forward through their domain name service and it will work. Forwarding will not work — you have to set the nameservers & DNS of your short domain so that its settings are identical to those of your website's main URL. Sometimes this will also entail configuring your webserver (for instance if you're using apache, you'd add ex.com as a domain name alias) to accept the new domain name. You'll know you've got this set up correctly when you can type http://ex.com and it will go to your website at http://example.com but your address bar still reads “http://ex.com” …
- Forward Short Link Requests — you only need to go through this step if your WordPress is installed in a sub-directory. Also — I'm quite sure this step won't work on anything but an apache web server environment (if you don't know what you're running — it's probably apache).
- Create a file with Notepad (on Windows) or TextMate (on Mac)
- Paste the following code into the file (this is just the standard rewrite stuff found in WordPress' .htaccess file):
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /mycoolsubdir/index.php [L] </IfModule>
- Replace the word “mycoolsubdir” (above) with the actual path to your wordpress installation — for instance if my wordpress install was at http://example.com/myblog/ then you'd change that line above to read
RewriteRule . /myblog/index.php [L]
instead. - Save this file as htaccess.txt
- Upload htaccess.txt to the top – level directory (Document Root) of your website via FTP.
- Re-name htaccess.txt to .htaccess
- Add your short domain to Pretty Link Pro — This one's quite easy:
- Log into your WordPress admin (http://example.com/wp-admin)
- Go to “Pretty Link” -> “Pro Options” -> “Global Options”
- Check “Use an alternate Base Url for your Pretty Links”
- Add your short domain name in the “Pretty Link Base URL” text field
- Hit Save
That's it! Okay — so that may seem a bit intimidating to some but it's really not that bad and certainly easier than any alternative. And the best part is that once you get it setup you don't have to mess with it again 🙂 …
Bob Koch says
Blair, great post! Question: I noticed your tweets include a https://blairwilliams.com/syz pretty link rather than a shortened domain like http://bw.com/syz Any particular reason why? It would save 10 characters on the tweet. Or is the full name (and branding) more important than the extra 10 characters? Your thoughts would be appreciated since I’m considering doing that on one of my blogs. Thanks!
Blair Williams says
Hahaha — touché — yeah, I haven’t quite gotten around to figuring out a short domain for my blog yet have I? I’ll give some thought as to what my shorter domain name should be and then make the switch. Oddly enough, the extra characters in my domain name have never really bothered me while sending tweets much … Although if my domain name were http://blair-williams-software-engineer-and-tinkerer.com I think I’d be *much* more motivated to say the least. 🙂
Lawrence Rolograaf says
haha http://bla.ir/ is already taken by Tim!
Bob Koch says
Hey, that wasn’t meant as a jab! I was just wondering if you thought the extra 10 characters were that big a deal. If it’s worth the effort for 10 characters on a tweet, then I’d go for it. If not, then I’ll stick with the full URL. Thanks! BTW, finding a shorter domain name as a URL replacement could be a challenge – a lot of the ones I looked at were taken already!
Lawrence Rolograaf says
Bob maybe try a domain in Switzerland? http://ko.ch
Blair Williams says
Haha– I didn’t look at it as a jab either — I just thought it was funny. But yeah — I have to second rolograaf — ko.ch is a good one although it can be pricy to get 2 letter domains. I registered a 3 letter short domain with an .li extension but I’m not using it for anything because it doesn’t have any significance to my business. So maybe I should write an article on picking a short domain — that may be the bigger issue. Oh, and rolograaf — I already investigated bla.ir — even went to the iranian domain name registry — maybe I’ll hit him up a about it see if he’ll sell. 🙂
Bob Koch says
Every site I checked would not allow a 2 character domain name like http://ko.ch but I can get one that will save 9 characters off my website URL. Not a huge savings but would be unique and eye-catching. Not too pricey either, about $17 per year.
Thanks Rolograaf for the idea on the .ch domain! Didn’t even think about that!
Diamond says
Quick question, will I need to be a Pretty Link Pro member to do this
Blair Williams says
Yeah — to get this working requires a feature that is only found in Pretty Link Pro — the Alternate URL Configuration feature.
mike w says
Quick question that might be a bit ‘out there’ – but what I’m looking for is a way to use a short-link generation system like PLP, but instead of for a single domain, having it integrated into a wordpress 3 multisite setup so that all of the sites in the network use the same ‘shorter’ url to redirect.
Does that make sense?
Is PLP multisite / network aware? Have you ever run into anything like this?
Thanx in advance,
Mike W
cartpauj says
Pretty Link is not fully Network capable yet but last I heard Blair was working on getting a Network compatible version out in the future. When? — that I don’t know.