Add a new website
This tutorial will guide you though setting up a new website (or virtual host if you will) on IIS 7.5.
Time to complete: ~5 minutes
The procedure to add a new website to IIS 7.5 is the same no matter which operating system you use (Windows 7 or Server 2008).
1. Open the IIS Manager
To begin, open the IIS Manager from Start > Control Panel / Administrative Tools / IIS Manager.
2. Add the website
– Expand the tree on the connections column.
– Right click Sites.
– Select Add Web Site…
3. Configure the new website
This window is the initial new website configuration. From here we will make a basic working site.
– In Site name, enter a name to identify your website. The domain or name of the site is best.
– In Physical path enter the path to the website files. You can put this anywhere on your hard drive but the default is c:\inetpub\wwwroot\.
In the binding set, you can select how the site is bound to the server.
– Type: Select HTTP if you don’t know what you’re doing here.
– IP Address: Select your IP here. When using Windows 7 you’re probably hosting at home, so this will probably be your local IP such as 192.168.1.123 otherwise it may be something else.
– Port: This should not be changed unless required as port 80 is the only port you can use without adding :port at the end of your domain. You should only change this if your ISP blocks port 80.
– Host name: This should be your domain name. If you don’t have one and want to use your IP, leave it blank.
– When you have filled in the boxes, click OK and the website will be created.
4. Extra Configuration
Although the site is now live, we need to make a few adjustments to ensure it works properly.
– Right click on the website we have just created and select Edit Bindings.
In this window, we need to add in the domain again, but this time slightly differently.
– If you entered www.yourdomain.com the first time, now we need to add it again but without www. so it’s just domain.com.
– If you entered yourdomain.com the first time, we now need to add it again but with www. infront to make www.yourdomain.com.
5. Set up your domain’s DNS
Now that you have your site running with IIS, you need to set up the DNS zones to point to your IP. This is different depending on your registrar but all run along the same lines.
– Set up a new A record that points to your IP. You will need to do this twice, once with and once without www.
www A 18.104.22.168
@ A 22.214.171.124
Note: @ refers to without www. Sometimes this is also referred to with * or just blank.
You will need to wait up to 24 hours for the changes to take place once you have submitted them.
6. Check your new website
To check your new website, simply visit your domain (or IP if you are using that instead).
If it doesn’t work, check your domain settings and make sure your server is accessible from the outside.