How to configure subdomains on IIS 7

I have a site sitting on the IIS 7 server: WWW.example.COM

I would like to create some subdomains that look like SUBDOMAIN1.example.COM

I created the IIS website and I set the http bindings, port 80, the IP address of my server and SUBDOMAIN1.example.COM, and the physical folder path in example.COM

I restarted my website and clicked on view, browser, than opened with the address: http://SUBDOMAIN1.example.COM

But the website is not displayed.

Do I need to do something with DNS?

+52
iis iis-7 subdomain
Nov 01 '10 at 13:30
source share
5 answers

It drove me crazy ... basically you need two things:

1) Make sure your DNS is configured to point to your subdomain. This means that you have an A record in the DNS for your subdomain and specify the same IP address.

2) You must add an additional website in IIS 7 called subdomain.example.com

  • Sites> Add Site
  • Site Name: subdomain.example.com
  • Physical path: select a subdomain directory
  • Binding: same ip as example.com
  • Host Name: subdomain.example.com
+77
Jan 17 2018-12-12T00:
source share

If your computer cannot find the IP address associated with SUBDOMAIN1.example.COM , it will not find the site.

You need to either change the hosts file (so that you can at least check things out - it will be a local change, available only for yourself) or update the DNS so that the name resolves correctly (so that the rest of the world can see it).

+5
Nov 01 '10 at 13:33
source share

Wildcard method: add the following entry to your DNS server and change the domain and IP address accordingly.

*. example.com IN A 1.2.3.4

http://www.webmasterworld.com/microsoft_asp_net/3194877.htm

+5
Nov 03 '14 at 8:42
source share

As DotNetMensch said, but you DO NOT need to add another site to IIS, as it can also cause additional problems and complicate the situation, because you have a website on the website, so there are file paths, main page paths and web paths. config may need a change. You just need to edit the bindings of the existing site and add a new subdomain there.

So:

  • Add a subdomain to DNS records. My host (RackSpace) uses a web portal for this, so you just go to Network-> Domains (DNS) โ†’ Actions-> Create Zone and enter your subdomain as mysubdomain.domain.com, etc. Leave the other settings to default

  • Go to your domain in IIS, right-click-> Change Bindings-> Add and add a new subdomain, leaving everything else the same, for example. mysubdomain.domain.com

You may need to wait 5-10 minutes to update your DNS records, but that's all you need.

0
Nov 18 '14 at
source share

You can use the apache server, it checks the URL for the subdomain, so you just need to configure DNS on the main website.

0
Jan 19 '17 at 6:11
source share



All Articles