Custom Domain URL Shorteners with bit.ly

DIYTutorial

I recently acquired leav.in because I wanted to make my own URL shortening service. After spending a few hours making a little Rails application that connected to a backend service and a nice little UI, I decided to actually google "custom domain URL shortner." Low and behold, bit.ly offers a free service, bit.ly pro that provides custom domain short URL service and then some! It was a little difficult to fiddle through (not because of configuration, but just finding stuff), so here's a little walk through to help you out!

  1. Buy a short domain name. I recommend name.com just because they give great tools for managing DNS, are cheap, and their DNS updates almost instantly.
  2. Create a bit.ly account:

    Signup for bit.ly

  3. Add bit.ly pro to your account (it's free)

  4. Enter your settings panel:

    Settings Panel

  5. Click on your bit.ly pro settings:

    bit.ly pro settings

  6. Go and modify your DNS records with your host as described in the grey box. Do this first so that the changes can populate as you do step

  7. Enter your short URL domain in the box provided and click "Add Short Domain".

    Add short domain

  8. Be sure to verify that your DNS is configured correctly. Depending on your provider, you may need to wait up to 48 hours for these changes to populate:

    DNS

  9. Unless something terrible went wrong, you should see something similar to the following:

    Final

About Seth

Seth Vargo is an engineer at Google Cloud. Previously he worked at HashiCorp, Chef Software, CustomInk, and some Pittsburgh-based startups. He is the author of Learning Chef and is passionate about reducing inequality in technology. When he is not writing, working on open source, teaching, or speaking at conferences, Seth advises non-profits.