Say you want to register a couple different typos of your domain name, and redirect everyone seamlessly to the correct site. This can be done quite easily in Apache using ServerAlias and a simple RewriteRule. I just registered geoloqui.com after noticing a couple articles linking to it instead of geoloqi.com. But then I thought, wouldn’t it be useful if I could track these typos and see which ones are most common? Turns out it’s not difficult!

Here is a snippet of my virtual hosts definition for geoloqi.com:

<VirtualHost *:80>
	ServerName geoloqi.com
	ServerAlias *.geoloqi.com
	ServerAlias geoloqui.com
	ServerAlias *.geoloqui.com

	RewriteEngine on
	RewriteCond %{HTTP_HOST} !^geoloqi.com
	RewriteRule ^/(.*)$ http://geoloqi.com/$1?utm_source=DomainRedirect&utm_medium=%{HTTP_HOST} [R=permanent,L]
...

This will make domain typos visible in Google Analytics under the "All Traffic Sources" section. You can clearly see the referrals from the typo'd domain name at the bottom of this list.

typo-domain-referrers.png

You could also use the filter box to search for "DomainRedirect" and see only the typos.

I'd be curious to know if anybody else has other suggestions for tracking this type of thing.

Comments

Retrieved from "http://www.aaronparecki.com/Tracking_typos_of_your_domain_name_in_Google_Analytics"