Redirect root domain of custom short URLs using pro

Posted Apr 15, 2010

We recently used pro to implement custom short urls for – with Its currently a free service and works the same as shortened URLs, only with a custom domain name of your choosing. Amazon just announced yesterday that they are using pro for custom URLs using

Things worked great, and it was easy to set up the custom url with pro by changing the A record for the domain name, however this meant that anyone going to directly with no hash on the end would be redirected to’s main page. We needed this to redirect to a URL of our choosing, in thi s case This isn’t an option in pro, according to their FAQ its only available for bitly.Pro Enterprise users which costs $995/month. This was way beyond our price range.

Fortunately, its pretty easy to use .htaccess to carry out this.

  • First, you need to set up the short domain name to use namesevers that point to a hosting account you control. For us, this was Media Temple so we set nameservers to and
  • Next, add a file called .htaccess
  • The contents of the .htaccess file should be:
                RewriteEngine on
                RewriteRule ^/?$ [L]
                RewriteRule ^(.*)$$1 [R=301,NC]  
  • You should replace "" with the domain name you'd like to redirect the root to
  • Enjoy pro, with at least one feature of enterprise