Internet Information Services (IIS) is Microsoft's built-in web server for Windows, and it ships with every copy of Windows 11 Pro, Enterprise and Education. You do not need to download anything: a few clicks (or one PowerShell command) turns your PC into a working web server, and within fifteen minutes you can be serving your own website from localhost. This guide walks through enabling IIS, verifying it works, and hosting your first site with its own folder, binding and permissions.
Prerequisites
- A PC running Windows 11 Pro, Enterprise or Education. IIS is not included in Windows 11 Home, so check your edition first under Settings > System > About. Home users can upgrade to Pro or use an alternative server such as Apache or Nginx.
- An administrator account. Enabling Windows features and binding to ports below 1024 both require elevated rights.
- About 15 minutes and roughly 200 MB of free disk space for the IIS components.
- PowerShell or Command Prompt opened as Administrator for the command-line steps.
Step 1: Enable IIS on Windows 11
There are two reliable ways to turn IIS on. The graphical method is the easiest to follow; the PowerShell method is faster and repeatable, which makes it the better choice if you set up machines often.
Option A: Enable IIS from Windows Features
Open the Start menu, type Turn Windows features on or off and open it. In the list, tick Internet Information Services and expand it to make sure Web Management Tools and World Wide Web Services are also selected. Click OK and let Windows apply the changes, then restart your PC if prompted.
Option B: Enable IIS with PowerShell
Right-click Start, choose Terminal (Admin), and run the following command. The -All switch pulls in every dependency the web server role needs, so you do not have to enable features one by one.
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -All
PowerShell prints a short progress report and ends with a restart notice if one is required. If you prefer the classic DISM tool, the equivalent command is:
dism /online /enable-feature /featurename:IIS-WebServerRole /all
Both commands install the same core: the web server, the default document handler, static content support, the IIS Manager console and the logging tools.
Step 2: Verify IIS is running
Once the feature is enabled, the World Wide Web Publishing Service (W3SVC) should already be running. Confirm it with this command:
Get-Service W3SVC
The output should show Status: Running. If it shows Stopped, start it with:
Start-Service W3SVC
Now open a browser and visit http://localhost. You should see the blue IIS welcome page. That page is served from C:\inetpub\wwwroot, the default website's folder. If the page loads, IIS is installed and working correctly.
Step 3: Understand the default site before you change anything
IIS ships with one website already configured, called Default Web Site, listening on port 80. Its files live in C:\inetpub\wwwroot and it runs inside an application pool named DefaultAppPool. An application pool is the worker process that executes your site's code; keeping each site in its own pool means one crashing site cannot take the others down.
You can inspect the default setup in IIS Manager: press Win + R, type inetmgr and press Enter. In the left-hand Connections pane, expand your computer name, then Sites. Right-click Default Web Site and choose Explore to open its folder, or Manage Website > Browse to open it in a browser.
For learning and testing, it is fine to drop a file into wwwroot. For anything real, create a separate site with its own folder and port, which is what the next steps do.
Step 4: Create your first site
First, make a folder for the site and add a simple home page. Replace MySite with any name you like.
New-Item -ItemType Directory -Path "C:\Sites\MySite" -Force
Set-Content -Path "C:\Sites\MySite\index.html" -Value "<!DOCTYPE html><html><body><h1>Hello from my IIS site!</h1></body></html>"
The first command creates the folder; the second writes a minimal index.html into it. Next, register the site with IIS. The classic appcmd tool works on every Windows version and needs no extra module:
& "$env:windir\system32\inetsrv\appcmd.exe" add site /name:MySite /bindings:http/*:8080: /physicalPath:C:\Sites\MySite
This creates a site called MySite that listens on port 8080 on all network interfaces. Port 8080 is used deliberately: port 80 is already taken by the Default Web Site, and two sites cannot share the same binding. If you would rather use PowerShell cmdlets, import the WebAdministration module first and run:
Import-Module WebAdministration
New-IISSite -Name "MySite" -PhysicalPath "C:\Sites\MySite" -BindingInformation "*:8080:"
Either way, open IIS Manager afterwards and you will see MySite listed under Sites, with its own application pool created automatically.
Step 5: Fix folder permissions
A fresh folder only grants access to your own user account, but IIS serves files as the built-in IIS_IUSRS group. Without read permission, the site returns a 403 error. Grant it explicitly:
icacls C:\Sites\MySite /grant "IIS_IUSRS:(OI)(CI)(RX)"
This gives the IIS user group read and execute rights on the folder and everything inside it, including files you add later. It does not grant write access, which is exactly what you want for a public-facing site folder.
Step 6: Open the firewall port
Windows Firewall blocks inbound traffic to port 8080 by default. If you only ever browse the site from the same PC, you can skip this step. To reach it from another device on your network, add an inbound rule:
New-NetFirewallRule -DisplayName "IIS MySite 8080" -Direction Inbound -LocalPort 8080 -Protocol TCP -Action Allow
The rule opens TCP port 8080 for inbound connections. For a production server you would restrict the scope to trusted networks, but on a home LAN this simple rule is standard practice.
Step 7: Browse your site
Visit http://localhost:8080 on the same PC, or http://<your-PC-IP>:8080 from another device on your network. You should see "Hello from my IIS site!" rendered in the browser. Find your PC's LAN address with:
ipconfig
Look for the IPv4 Address under your active network adapter, usually something like 192.168.1.20. If the page loads from another device, your site is genuinely being served over the network, not just looped back locally.
Verify it worked
http://localhostshows the IIS welcome page (default site, port 80).http://localhost:8080shows your "Hello from my IIS site!" page.Get-Service W3SVCreports Running, andGet-IISSitelists both sites with State Started.- The site loads from another device on your network using your PC's LAN IP and port 8080.
- Stopping the test proves the plumbing: run
Stop-IISSite -Name "MySite"and the page should stop responding, thenStart-IISSite -Name "MySite"to bring it back.
Common issues and fixes
1. "This site can't be reached" on localhost:8080
The site is probably stopped, or the binding is wrong. In IIS Manager, select MySite and check its state in the right-hand Actions pane. Also confirm no other program grabbed port 8080 first: run netstat -ano | findstr :8080 and check whether another process ID is listening there.
2. HTTP Error 403.14 — Forbidden (directory listing denied)
IIS cannot find a default document in your folder. Make sure index.html (or index.htm, default.html) actually exists in the site's physical path, and that the file name matches one of the entries under the site's Default Document feature in IIS Manager.
3. HTTP Error 500.19 — configuration data is invalid
This almost always means a feature your web.config references is not installed, for example URL Rewrite or ASP.NET. Read the error page: it names the exact config section. Enable the missing feature under Turn Windows features on or off, under Internet Information Services > World Wide Web Services > Application Development Features.
4. 401 or 403 errors after creating the site
Folder permissions are the usual cause. Re-run the icacls command from Step 5 and double-check the physical path in the site's Basic Settings points at the folder that actually holds your files. A typo in the path produces a 404 or a permissions error instead of your page.
5. Site works locally but not from another device
Either the firewall rule is missing or you are using the wrong IP. Re-run the New-NetFirewallRule command from Step 6, confirm the rule exists with Get-NetFirewallRule -DisplayName "IIS MySite 8080", and re-check your LAN address with ipconfig. Remember that exposing a port to the wider internet requires router port forwarding and is a separate, security-sensitive step.
What to do next
You now have a working IIS installation and a site of your own running on it. The natural next steps are binding a real domain name with a host header instead of a port number, adding HTTPS with a free Let's Encrypt certificate via win-acme, and installing the ASP.NET Core Hosting Bundle if you plan to run .NET applications. Each of those builds directly on the site, bindings and permissions you set up here.
If you would rather have an expert handle your Windows or Linux server setup, hosting configuration or website deployment, the team at XpertBees does exactly that — reach out and we will get your server running properly.



