Dynamic hostname in ASP.NET

How can I dynamically create a hostname in ASP.NET? For example, if people come to my site, I want to be able to dynamically generate their name .Mysite.Com. I've seen this before on other sites, but can't find any documentation on how to do this. Any help would be greatly appreciated. I am using VB.NET/ASP.NET 2008 and IIS 6.0

+2


source to share


1 answer


  • Configure authoritative DNS to resolve any subdomain to the same IP address.
  • Configure a web server by IP address to serve the same website for any subdomain
  • Use the HTTP_HOST environment variable to get the DNS name:


Request.ServerVariables ["HTTP_HOST"]
+3


source







All Articles