IIS (Internet Information Services) is Windows Server's built-in web server. It is used to publish ASP.NET and .NET applications, static sites and APIs. In this guide we explain how to install IIS on a Windows Server VDS with PowerShell, add ASP.NET support, create a new site, bind a domain and set up a free SSL certificate.
Requirements
- A VDS or dedicated server running Windows Server 2019, 2022 or 2025.
- Remote Desktop (RDP) access with the Administrator account.
- A domain pointed to the server's IP address (A record).
We recommend changing the RDP port before exposing the server to the internet: guide to changing the RDP port.
Step 1: Install IIS
Open PowerShell as Administrator and install the web server role together with the management tools:
Install-WindowsFeature -Name Web-Server -IncludeManagementToolsWhen the installation finishes, you should see the IIS welcome page when you open http://localhost in a browser.
Step 2: Add ASP.NET and useful modules
# ASP.NET 4.x support
Install-WindowsFeature Web-Asp-Net45
# Compression, the infrastructure needed for URL rewriting, and logging modules
Install-WindowsFeature Web-Dyn-Compression, Web-Http-Redirect, Web-Http-Logging, Web-Request-MonitorTo run ASP.NET Core applications such as .NET 6/7/8 on IIS, you need to download and install the ASP.NET Core Hosting Bundle from Microsoft's official website and then run the iisreset command.
For URL rewrite rules (e.g. redirecting HTTP to HTTPS), it is also recommended to install Microsoft's URL Rewrite extension.
Step 3: Create the site folder
New-Item -ItemType Directory -Path "C:\inetpub\alanadiniz.com" -Force
Set-Content -Path "C:\inetpub\alanadiniz.com\index.html" -Value "<h1>Merhaba IIS!</h1>"Step 4: Create the application pool and the site
Running each site in its own application pool prevents a problem on one site from affecting the others:
Import-Module WebAdministration
New-WebAppPool -Name "alanadiniz.com"
New-Website -Name "alanadiniz.com" -Port 80 -HostHeader "alanadiniz.com" -PhysicalPath "C:\inetpub\alanadiniz.com" -ApplicationPool "alanadiniz.com"
New-WebBinding -Name "alanadiniz.com" -Protocol http -Port 80 -HostHeader "www.alanadiniz.com"To do the same through the graphical interface, open Server Manager » Tools » Internet Information Services (IIS) Manager, right-click Sites and choose Add Website.
The "Default Web Site" that comes with the installation also listens on port 80. If you add a site without a host header (domain name), a conflict occurs; you can stop or delete the default site.
Step 5: Open the ports in the firewall
The IIS installation usually adds the required rules. If not:
New-NetFirewallRule -DisplayName "HTTP 80" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow
New-NetFirewallRule -DisplayName "HTTPS 443" -Direction Inbound -Protocol TCP -LocalPort 443 -Action AllowStep 6: Free SSL certificate (Let's Encrypt)
The most practical way to get a Let's Encrypt certificate on Windows is the open-source win-acme tool:
- Download the latest version from win-acme's official website (win-acme.com) and extract it to a folder.
- Run
wacs.exeas administrator. - Choose the N: Create certificate (default settings) option.
- Select your IIS site from the list; the tool detects the domain names automatically.
- The certificate is issued, added to IIS as a 443 binding, and a scheduled task is created for automatic renewal.
Step 7: Redirect HTTP to HTTPS
If the URL Rewrite extension is installed, add the following rule to the web.config file in the site folder:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTPS'e yonlendir" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>Performance and security recommendations
- Enable dynamic and static compression (IIS Manager » Compression).
- Leave the application pools' Identity setting at the default
ApplicationPoolIdentity; grant only the necessary permissions on the site folder. - Disable unused IIS modules and WebDAV.
- Run Windows Update regularly.
Conclusion
With IIS you can publish ASP.NET and static sites on Windows Server with just a few commands, and add free SSL with win-acme. For your Windows Server projects, take a look at our DDoS-protected VDS servers, or our dedicated servers for heavy workloads.
Frequently Asked Questions
Is IIS paid?
No. IIS is a free role included in Windows Server; you only need a Windows Server license.
Can I run PHP on IIS?
Yes. You can add PHP to IIS via FastCGI. However, for PHP projects, Nginx or LiteSpeed on Linux usually perform better.
Can I get free SSL for IIS?
Yes. With open-source tools such as win-acme, you can obtain a Let's Encrypt certificate, bind it to your IIS site and enable automatic renewal.
