ASP.NET MVC Routing based on domain & hostname
you can use Domain Routing mapping
routes.Add("DomainRoute", new DomainRoute( "{customer}.example.com", // Domain with parameters "{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ))