Getting Started with IIS on Windows Server

Internet Information Services (IIS) is Windows Server’s native web server — the Windows equivalent of Apache or Nginx, deeply integrated with the rest of the Windows ecosystem (Active Directory auth, .NET hosting).

Install-WindowsFeature -Name Web-Server -IncludeManagementTools

# Create a new site
New-Website -Name "MySite" -PhysicalPath "C:\inetpub\mysite" -Port 8080

# Manage application pools (isolated worker processes per site)
New-WebAppPool -Name "MySiteAppPool"
Set-ItemProperty "IIS:\Sites\MySite" -Name applicationPool -Value "MySiteAppPool"

web.config: IIS’s Equivalent of .htaccess

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="HTTPS redirect" 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>

Application pools give IIS a genuine isolation advantage — each site’s worker process is fully separate, so a crash or memory leak in one application pool never affects sites running in a different one, unlike some simpler setups where everything shares a single process.