Custom Short URLs for a Website

In 2011, I needed an easy way to promote one of my online projects on Information Technology to smartphone users, and to do this, I needed to research how to create custom short URLs for a website.

Domain Name
My first task was to register a shorter domain name (sipyl.us) and then insert the following code into the .htaccess file in the root of the site.

# [ Custom Short URL ]
RewriteEngine on
RewriteRule ^/?$ https://www.sipylus.com [R=301,L]
RewriteRule ^(.*)$ https://bitly.com/$1 [R=301,NC]
# [ Custom Short URL ]

Bitly Pro Account
With the domain name registered, active, and loaded with the .htaccess file, it was time to register for a Bitly account so I could track stats and receive the API information to tie into my domain. Now, when a user types in sipyl.us/ZXMMS4 in the browser, they are redirected to this article, and without having to pay the enormous fees that Amazon, Pepsi, and news agencies would typically pay.

Stephan Pringle

About The Author: Stephan Pringle is an Information Technology Support Specialist. He covers hardware and software and provides tips for you to troubleshoot and repair issues on your own. In his spare time, he writes articles about the State of New York on his Hackintosh and HackBook and that has helped him to become the top contributor of the New York City section of Yahoo! Answers.