How to create website on IIS in Windows Server 2012 R2

How to create website on IIS in Windows Server 2012 R2

IIS is Internet Information Services which is used to publish and host a website like Twitter.com. Website is a collection of relative webpages what include the home page. Web pages are written in HTML (Hypertext Markup Language) language. IIS is one of the most popular service of Microsoft. In this article, we’ll learn the steps to create website on IIS in Windows Server 2012 R2.

Steps to Host/ Create website on IIS on Windows Server 2012 R2

1. When you install IIS on Windows server 2012 R2, it create a default site. To check the default site of IIS, click on Start then select Internet Explorer and type http://server-name (Server-name is the name of Computer on which you have installed IIS) then hit Enter and you will get the default page.

HowtocreatewebsiteonIIS

HowtocreatewebsiteonIIS

HowtocreatewebsiteonIIS

2. Web designers are responsible to create website but for this practical, we’ll create a simple webpage. To create a webpage open Notepad and type content and then save it as Dot HTML (.html) file. We would not learn HTML in this practical, as it is out of scope for this post. Once the file is created, we’ll save the file in C:\IIS folder. By default all the IIS contents are saved in c:\inetpub\wwwroot.

HowtocreatewebsiteonIIS

 

HowtocreatewebsiteonIIS

 

3. To create website, open IIS window, click on start then select down arrow and select Internet Information Service icon.

HowtocreatewebsiteonIIS

4. On the IIS console, we have to stop the default site by clicking on stop. As the default site is running on port 80 and we need to create website which would also run on port number 80.

HowtocreatewebsiteonIIS

5. To create website right click on sites and then select Add website.

HowtocreatewebsiteonIIS

 

6. To create website, Define the name, physical path and bindings like Type of sites(http or https), IP address and Port of the website.

In “IP Address” option, you can even select an IP address on which you want this site to run.

Steps to change IP Addres using Command Prompt

In “Port” option define the port number for this site, you can even define the custom port e.g. 81 or 8080 or 8081, etc. In “Host Name” we can even define the domain name, we’ll talk about this in future article.

Click on Ok to continue.

HowtocreatewebsiteonIIS

7. We’ll get a warning message that port:80 is assigned to another site and we’ll not be able to start our website that’s why we have to confirm to add this duplicate binding  by clicking on YES. This would not break anything as we already disabled “Default Website”.

HowtocreatewebsiteonIIS

8. On IIS Manager window we can see our website is created.

HowtocreatewebsiteonIIS

9. Open Internet Explorer  to browse our site which we have created.

10. Type server name (http://servername) in address bar and hit enter. This would show the webpage that we created.

HowtocreatewebsiteonIIS

 

11 thoughts on “How to create website on IIS in Windows Server 2012 R2

  • August 8, 2016 at 11:08 pm
    Permalink

    thank you so much

  • November 26, 2016 at 2:46 am
    Permalink

    Is there a way to backup and move the website to Cloud without any data loss

  • November 28, 2016 at 9:15 am
    Permalink

    Wow that is brilliant, it helped me in creating Website on IIS in Windows Server 2012 R2.

  • December 1, 2016 at 10:36 am
    Permalink

    Hello there! Would you mind if I share your blog
    with my twitter group? There’s a lot of people
    that I think would really enjoy your content.

    Please let me know. Many thanks

  • January 16, 2017 at 11:03 pm
    Permalink

    Thanks for sharing great article on creating website on IIS. Please suggest shall I follow the same steps i. e. IIS to create and host public website. What is your recommendation to create a public website if I am not a coder and don’t know a bit of coding.

  • February 26, 2017 at 6:42 pm
    Permalink

    Thanks for the article.

  • February 27, 2017 at 9:31 pm
    Permalink

    I am running a website on Windows Server 2003, can I move the same Website on Windows Server 2012 R2 without any downtime ?

  • March 22, 2017 at 2:20 am
    Permalink

    Thanks for the detailed information to setup IIS on Windows Server 2012 and promoting it as a Web Server. Really worth reading and implementing.

  • March 23, 2017 at 1:03 am
    Permalink

    How to host a website Windows Server 2016 ? Do we need to follow different steps than configure IIS on Windows Server 2012?

  • March 25, 2017 at 2:34 am
    Permalink

    I am working as a System Admin in small sized Organization. we are using Windows Server 2012 Web Servers in our Organization and planning to setup IIS on Windows Server 2012 Server. Please confirm is there any script that we can use to set up website in IIS on multiple servers with single click of a button.

  • March 26, 2017 at 3:34 am
    Permalink

    Hi There! Thanks for the amazing writeup on creating Websites on IIS. It really helped me in creating website without any issues.

Comments are closed.