Internet Information Services (IIS) is Microsoft's web server, built into Windows Server, used for hosting websites, ASP.NET applications, and APIs.
Prerequisites
- Windows Server VPS with Administrator access
Installing IIS via Server Manager (GUI)
- Open Server Manager → Manage → Add Roles and Features
- Click through to Server Roles
- Check Web Server (IIS)
- Add required features when prompted, then click Install
Installing IIS via PowerShell (Faster)
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Verifying the Installation
Get-WindowsFeature -Name Web-Server
Or open a browser on the server and visit http://localhost — you should see the default IIS welcome page.
Allowing HTTP/HTTPS Through the Firewall
New-NetFirewallRule -DisplayName "Allow HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow
New-NetFirewallRule -DisplayName "Allow HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
Testing from Outside the Server
http://YOUR_SERVER_IP
Key File Locations
| Path | Purpose |
|---|---|
C:\inetpub\wwwroot | Default website root |
C:\Windows\System32\inetsrv | IIS management tools |
| IIS Manager (GUI) | Site and application pool configuration |
Opening IIS Manager
inetmgr
Run this from the Start menu or Run dialog for the graphical management console.
Adding a New Website
- Open IIS Manager
- Right-click Sites → Add Website
- Set a site name, physical path (e.g.
C:\inetpub\wwwroot\mysite), and binding (hostname and port) - Click OK
Installing the URL Rewrite Module (Commonly Needed)
Download and install from Microsoft's IIS website — required by many modern web applications for clean URLs and reverse proxy scenarios.
Common Errors
"HTTP Error 500.19" — usually a web.config misconfiguration; check the exact error detail shown on the error page for the specific module/setting causing it.
Site not accessible from outside the server — verify the firewall rules were added and the site binding matches the correct port/hostname.
"503 Service Unavailable" — the application pool has stopped; restart it via IIS Manager or:
Start-WebAppPool -Name "DefaultAppPool"
Best Practices
- Use separate application pools per site for isolation
- Keep IIS and Windows Server updated
- Enable HTTPS for production sites — see How to Install an SSL Certificate on IIS
FAQ
Can IIS host non-.NET applications?
Yes — with the appropriate modules/handlers, IIS can serve static content, PHP, Node.js (via reverse proxy or iisnode), and more, though it's most commonly paired with ASP.NET applications.
Related Articles
- How to Install an SSL Certificate on IIS
- How to Configure Windows Firewall on a Windows VPS
- How to Deploy an ASP.NET Application on IIS
