How to Install and Configure a Web Server (IIS) in Windows Server


This guide covers web server in Windows Server step by step, with every setting in the order you will use it. Internet Information Services (IIS) is the web server role built into Windows Server. Installing it and publishing a first website is a classic lab exercise for the MCSA and for anyone learning Windows administration. Here is the full process.

web server in Windows Server in a home lab

WINDOWS SERVERWEB SERVER IN WINDOWS SERV…ENTERPRISE LABtimer 45 MIN LAB
NH
Nurul Huda AUTHORInfrastructure & Cloud Architect · Verified 2026

print Print Lab

● VALID ON THE CONFIG BELOW

dns LAB TOPOLOGY & PREREQUISITES

# example values used while writing and testing this guide

LAB VM

HypervisorESXi / Workstation
vCPU2
RAM4-8 GB
Disk60 GB thin

WINDOWS BUILD

EditionServer 2019 Std
InterfaceDesktop Experience
Adminlocal Administrator
IPstatic or DHCP

VALIDATION

RolesServer Manager
Firewalllab rules only
Snapshotbefore changes

01constructionStep 1: Install the Web Server (IIS) Role

In Server Manager, choose Add Roles and Features and follow the wizard:

  1. Select Role-based or feature-based installation and pick your server from the pool.
  2. In the Server Roles list, check Web Server (IIS), and accept the prompt to add the required features.
  3. On the Role Services page, keep the defaults for a basic site, and optionally add extras such as HTTP Redirection or Basic Authentication.
  4. Complete the wizard and let the server install the role.

Prefer the command line? One PowerShell command does the same:

Install-WindowsFeature Web-Server -IncludeManagementTools

02downloadStep 2: Test the Default Website

After installation, open a browser on the server and browse to http://localhost. The default IIS page confirms the web server is running. The site’s files live in C:\inetpub\wwwroot.

03usbStep 3: Publish Your Own Content

Replace C:\inetpub\wwwroot\iisstart.htm with your own HTML files, or create a new site: in IIS Manager, right-click Sites and choose Add Website, then set the site name, the folder with your files (the physical path), and the binding: an IP address, port 80 and an optional host name such as www.example.local.

04terminalStep 4: Configure Bindings and DNS

Each site is identified by its binding: IP + port + host name. To reach the site by name from other machines, create an A record on your DNS server pointing the host name to the web server’s IP. See the DNS server setup guide to configure DNS in Windows Server for your lab.

05settings_ethernetStep 5: Open the Firewall and Test Remotely

Windows usually adds the inbound rule automatically, but if clients cannot connect, open port 80:

New-NetFirewallRule -DisplayName "HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow

Then browse to the server from another VM using its IP or DNS name.

▶ COMPANION LAB WALKTHROUGH

Watch: How to Install and Configure a Web Server in Windows Server 2019/2016

Because some steps are easier to copy from video, this companion walkthrough mirrors the lab above. Also, the chapter pills follow the same order as the steps.

01 Step 1: Install the Web Server (II02 Step 2: Test the Default Website03 Step 3: Publish Your Own Content04 Step 4: Configure Bindings and DNS05 Step 5: Open the Firewall and Test
▶ UP NEXT IN THE WINDOWS TRACK

How to Install and Configure a Database Server in Windows Server

Finish this lab, then continue down the track. Each guide builds on the one before it.

rocket_launch Launch Next Lab