You may have seen the website in the guise of www.dotnetkicks.com, but it also can be viewed from the following domains: www.kick.ie, www.javakicks.com & www.mozillakicks.com. All of these hosts are mapped to the same ASP.NET application in IIS. This has a number of benefits:
- Reduced memory footprint - there is only one IIS application running for all four hosts
- Shared cache - As the AppDomain is the same for all four websites, the cache is shared
- Ease of deployment and maintenance - we are only dealing with one deployed application. Creating new sites on new hosts is also a snap - simply add the domain mapping in IIS and add a new row in the Host table in the database
The mapping from domain to application is achieved in IIS (you can test this on your development machine by adding a few host entries in your system32\drivers\etc\hosts file):

A Host table in our database defines a number of properties of each host including the MasterPage & Theme to use (currently all sites are using the same MasterPage) and whether to show ads or not. The host information is cached in memory for quick access and this cache is accessed early in the lifecycle of each incoming page request, allowing the resulting response to be customised for the host of the request.
Any subsequent calls to the Data Access Layer will include the HostID of the current request, allowing us to tailor the data for the specific host. You can see this by using your www.dotnetkicks.com login on the other sites too.