Notification

Urchin WebAnalytics Software is discontinued and is no longer supported. All Urchin documentation applies only to the Urchin product as it was at the time of discontinuation, and does not apply to any Google Analytics products or services.

Using UTM with Domain Aliases

Background
Because cookies are domain based objects, there are some important considerations when a site has multiple domains. A cookie that is set under a domain, "mysite.com", will be passed to all subdomains such as "www.mysite.com". However, this cookie will not be passed to "mysite.net" or any other different root domains.

If your website only has one domain responding to "mysite.com" and "www.mysite.com", you can follow the standard UTM installation. However, If you have a website with one or many aliases, it is recommended to redirect traffic from the aliases to the primary site. This will ensure that the UTM visitor tracking is getting set under the primary domain and that all visitors are tracked consistently.

If we don't do this, then a visitor may appear as two visitors if they access the same site through two separate domains. The following instructions provides an example of how to redirect aliased domains to the primary domain in Apache and IIS servers.

Redirecting Aliases in Apache
If you are using an Apache webserver, the configuration can be easily modified to redirect all traffic originating under one of the aliases to the primary site. One way to do this is to create two VirtualHost entries. The first will be the primary domain which will include your normal configuration; and the second VirtualHost will be for all the aliases and will redirect to the primary. Example:

#---primary virtualhost
<VirtualHost 1.2.3.4>
Servername www.mysite.com
Serveralias mysite.com
...
</VirtualHost>

#---second virtualhost
<VirtualHost 1.2.3.4>
Servername mysite.org
Serveralias www.mysite.org mysite.net www.mysite.net
RewriteEngine on
RewriteRule ^(.*)       http://www.mysite.com$1     [R=301]
</VirtualHost>

The second VirtualHost uses a rewrite rule with a 301 (Moved Permanently) redirect code to forward all traffic to the original site. A single 301 hit will still be recorded in the log file which is nice for tracking which domains people are entering on, but all remaining traffic will be forced under the one domain. At this point, as far as the UTM is concerned, the site appears to be a one domain site and is ready for normal UTM installation.

Note: please be advised that you should work with your administrator and reference the apache.org site on configuration parameters.

Redirecting Aliases in IIS
If you are using a Microsoft IIS webserver, the configuration can be easily modified to redirect all traffic originating under one of the aliases to the primary site. One way to do this is to create two websites in the IIS configuration. The first will be the primary domain (www.mysite.com) which will include your normal configuration; and the second will be for all the aliases (mysite.net, mysite.org, etc) and will redirect to the primary.

In the IIS Manager, right click on one of the websites and bring up the properties dialog. On the "Web Site" tab, click the "Advanced..." button. This brings up the window where additional domains can be assigned to the website using the "Host Header" field. Set the primary domain in the primary website, and use the second website to house all of the aliases.

Once the second website housing all of the aliases is configured and enabled, create a blank homepage with the following redirect code:

<head>
<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.mysite.com/">
</head>

This will instruct the visitor's browser to immediately redirect to the primary URL. At this point, the primary website appears to be a simple one-domain configuration, and normal UTM installation can proceed with default settings.

 

Search
Clear search
Close search
Main menu
14157305340163680596
true
Search Help Center
true
true
true
false
false