Bitly offers the ability to set up a “Tracking Domain” which, according to bit.ly:
If you have a website, you can gather metrics on all bitmarks that point to your site.
There is a problem with verifying the domain using an HTML file (read on, see below).
Doing this also lets you set up bit.ly so that if someone shortens a URL to your domain it will use your custom shortener instead of the default bit.ly shortener.
You can change these settings at https://bitly.com/a/settings/advanced
Enter the root domain of your main site, to be used for tracking when end users are shortening links for your site.
The tracking domain is different than the custom short domain. Example: The New York Times tracking domain is nytimes.com, Their short domain is nyti.ms.
You have set your tracking domain as: willshouse.com.
To enable tracking for this domain, we need to verify that you own the domain. You can demonstrate ownership of your domain by choosing any one of the following (whichever is easiest for you):
Add an HTML tag to your web site’s home page:
add the following tag to https://techblog.willshouse.com/
<meta name="bitly-verification" content="01234567890"/>
Upload an HTML file to your web site:
download a zip file containing an HTML page here. Upload this HTML page so that it is available at:
Make a DNS change:
create a CNAME record for
01234567890.willshouse.com pointing to
Problem Verifying Domain using HTML file
I ran into a problem of verifying the domain name using the HTML zip file. I downloaded the zip file and extracted it, and got something like
01234567890.html but it was blank / empty inside. So I was trying to verify and bit.ly was telling me:
Verification started. Check back in a few minutes. It’s now 49 minute(s) past the hour. You have set your tracking domain as: willshouse.com.
This would never complete though, and the tracking domain would never be verified. The problem is that you need content inside of the HTML file that you put on your server. The content you need to add is in this format:
bitly-verification followed by the file name that it wants you to use.