0

My website will look something like online store, where every user has his online store as subdomain e.g. user1.myprojectdomain.com

we need help that how can Manage sub domains. Do we create a Virtual Directory/application for every user in the IIS on runtime or we can do some thing else

I have created a website xyz.com in my iis and created an entry in windows etc/localhost as follows

xyz.com   127.0.0.1

and it is working fine. and then I did added another entry to route all sub domains as follows

*.xyz.com   127.0.0.1

Now I am trying to use abc.xyz.com or any other but it is not working

Haseeb Asif
  • 1,766
  • 2
  • 23
  • 41
  • You can't use wildcards such as * in the windows hosts file. See http://stackoverflow.com/a/272092/622353. You'll need to add a new entry for each subdomain if you want to access it from the local machine. – greg84 Sep 15 '12 at 11:56
  • probably belongs on serverfault – bryanmac Sep 15 '12 at 11:58

1 Answers1

0

1) Make sure your DNS is setup to point to your subdomain. This means to make sure you have an A Record in the DNS for your subdomain and point to the same IP.

2) You must add an additional website in IIS 7 named subdomain.site.com

Sites > Add Website Site Name: subdomain.site.com Physical Path: select the subdomain directory Binding: same ip as site.com Host name: subdomain.site.com

Vikram Jain
  • 5,498
  • 1
  • 19
  • 31