Windows VPSWindows VPS

Install IIS on a Windows Server VPS

Enable IIS with one PowerShell command, create your sites, add PHP and HTTPS. Copy-paste commands, from Windows Server 2019 to 2025.

IIS (Internet Information Services) is the web server built into Windows Server. It hosts static sites, ASP.NET or PHP applications, and acts as a reverse proxy. This guide installs it and configures a first site on a Windows Server VPS at Lordhosting, from the command line as well as the graphical interface.

⚙️ Requirements

  • A Lordhosting VPS running Windows Server (2019, 2022 or 2025)
  • RDP (Remote Desktop) access with an administrator account
  • Optional: a domain name pointing to the VPS IP for HTTPS

Open PowerShell as administrator and install the role in one command:

Install-WindowsFeature -Name Web-Server -IncludeManagementTools

The graphical method is still possible via Server Manager → Add Roles and Features → Web Server (IIS), but PowerShell is faster and reproducible.

⚙️ 2. Verify the installation

Check that the server responds:

Invoke-WebRequest http://localhost -UseBasicParsing | Select-Object StatusCode

A 200 code confirms IIS is serving the default page. From an external browser, http://your_ip should show the IIS welcome page.

Nothing shows from outside?

The Windows firewall may be blocking port 80. Allow it: New-NetFirewallRule -DisplayName "HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow.

⚙️ 3. Create a website

Create the site folder, then declare it in IIS:

New-Item -Path "C:\inetpub\mysite" -ItemType Directory
Set-Content "C:\inetpub\mysite\index.html" "<h1>My site on IIS</h1>"
New-Website -Name "MySite" -Port 8080 -PhysicalPath "C:\inetpub\mysite"

The site is reachable at http://your_ip:8080. You can also manage it visually in IIS Manager (inetmgr).

⚙️ 4. Host multiple sites

To serve several domains on port 80, use host header bindings:

New-Website -Name "SiteA" -Port 80 -HostHeader "a.yourdomain.com" -PhysicalPath "C:\inetpub\siteA"
New-Website -Name "SiteB" -Port 80 -HostHeader "b.yourdomain.com" -PhysicalPath "C:\inetpub\siteB"

Each site automatically gets its own application pool, which isolates the processes: a site that crashes does not affect the others.

⚙️ 5. Install PHP (optional)

To serve PHP applications, install PHP then the FastCGI module:

Install-WindowsFeature Web-CGI

Download PHP (the Non-Thread-Safe build) from windows.php.net, unzip it into C:\PHP, then in IIS Manager open Handler Mappings → Add Module Mapping to map *.php files to php-cgi.exe.

⚙️ 6. Configure HTTPS

The simplest way to get a free certificate is win-acme (Let's Encrypt for Windows):

# Download win-acme from https://www.win-acme.com/ then run:
.\wacs.exe

The wizard detects your IIS sites, obtains the certificate and creates the HTTPS binding (port 443) automatically, with scheduled renewal.

✅ Conclusion

IIS is installed, serves one or several sites, and can handle PHP as well as HTTPS. To automate backups and restarts, continue with our Windows Scheduled Tasks guide.

Need a high-performance Windows server? Our Windows VPS are delivered in minutes with RDP included and full administrator access.


❗Always good to know

  • If a site refuses to start or the certificate won't go through, our support is here: open a ticket or drop by Discord.

Frequently asked questions

Back to Windows VPS
Was this article helpful?
Welcome Offer

Sign up now and enjoy 10% off on your first order by entering the promo code: WELCOME

Logo LordHostingLordhosting is a SASU with a share capital of €1,000. SIREN 105 383 988 RCS Paris.
Copyright © 2026 LordHosting.