For the complete documentation index, see llms.txt. This page is also available as Markdown.

🌍How to install IIS on Windows Server

IIS (Internet Information Services) is the built-in web server for Windows Server. It handles HTTP requests, hosts websites, and can run ASP.NET applications. No extra downloads needed.

Step 1: Open Server Manager

When you log into your Windows VPS via Remote Desktop, Server Manager opens by default. If it does not, click the Start button and type Server Manager.

Step 2: Add the Web Server role

  1. In Server Manager, click Manage in the top-right corner

  2. Select Add Roles and Features

  3. Click Next until you reach the Server Roles section

  4. Check the box for Web Server (IIS)

  5. A popup asks you to add required features. Click Add Features

  6. Click Next through the remaining screens

  7. On the Role Services screen, keep the defaults unless you need specific features like ASP.NET or CGI

  8. Click Install

The installation takes a minute or two.

Step 3: Verify the installation

Open a browser on your VPS and go to:

You should see the default IIS welcome page. You can also check from outside your VPS by visiting http://your-server-ip in your own browser.

Step 4: Understand the IIS folder structure

Folder
Purpose

C:\inetpub\wwwroot\

Default website files

C:\Windows\System32\LogFiles\W3SVC1\

IIS logs

C:\inetpub\history\

Configuration history

Step 5: Create your first website

  1. Open IIS Manager by typing IIS in the Start menu

  2. In the left panel, expand your server name, then right-click Sites

  3. Select Add Website

  4. Enter:

    • Site name: MySite

    • Physical path: C:\inetpub\wwwroot\mysite

    • Binding type: http

    • IP address: All Unassigned

    • Port: 80

    • Host name: leave blank (or enter your domain)

  5. Click OK

Step 6: Add a test page

Create a simple HTML file to confirm the site works:

Add this content:

Visit http://your-server-ip in your browser.

Step 7: Open port 80 in Windows Firewall

By default, Windows Firewall should allow HTTP after installing IIS. But if the site is not reachable from outside, check the firewall:

  1. Open Windows Defender Firewall from the Start menu

  2. Click Advanced settings

  3. Look for World Wide Web Services (HTTP Traffic-In) in the Inbound Rules list

  4. If it is disabled, right-click and select Enable Rule

Step 8: Enable HTTPS

To add HTTPS, you need a certificate. For a free one, use Let's Encrypt.

Install the Let's Encrypt client:

Then run the tool and follow the prompts:

Select option N for new certificate, then 1 to use a single site. The tool handles the rest.

Useful IIS management commands

Restart IIS from PowerShell:

Check IIS site status:

Start or stop a site:

Common issues

Default page does not load Make sure the website files exist in the correct folder and the App Pool is running. Open IIS Manager and check that the site has a green indicator.

"403 Forbidden" Check folder permissions. The IIS user (IUSR or ApplicationPoolIdentity) needs read access to the website folder.

"Port 80 already in use" Another application might be using port 80. Run netstat -ano | findstr :80 to see what is using it.

Conclusion

IIS is now installed and ready to host websites. It integrates well with Windows, ASP.NET, and SQL Server, making it a solid choice for Windows-based hosting.

Last updated