How to set up subdomains on IIS 7

I have a website sitting on an IIS 7 server:

I would like to create several sub domains that looks like

I created an IIS website and I set the bindings to be
http, port 80, the ip address of my server, and SUBDOMAIN1.example.COM and the physical path to a folder under example.COM

I restarted my website and clicked on browse, the browser than opened with the address:

But the website doesn’t show up.

Do I have to do something with the DNS?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This one drove me crazy… basically you need two things:

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

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

Method 2

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

* IN A

Method 3

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

You need to either change your hosts file (so you can at least test things – this will be a local change, only available to yourself), or update DNS so the name will resolve correctly (so the rest of the world can see it).

Method 4

As DotNetMensch said but you DO NOT need to add another site in IIS as this can also cause further problems and make things more complicated because you then have a website within a website so the file paths, masterpage paths and web.config paths may need changing. You just need to edit teh bindings of the existing site and add the new subdomain there.


  1. Add sub-domain to DNS records. My host (RackSpace) uses a web portal to do this so you just log in and go to Network->Domains(DNS)->Actions->Create Zone, and enter your subdomain as etc, leave the other settings as default
  2. Go to your domain in IIS, right-click->Edit Bindings->Add, and add your new subdomain leaving everything else the same e.g.

You may need to wait 5-10 mins for the DNS records to update but that’s all you need.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x