Internet Information Services (IIS) is Microsoft's web server platform for hosting websites, web applications, and web services on Windows Server.
IIS uses a modular architecture with separate worker processes for isolation.
Install the IIS web server role and management tools with PowerShell.
Add ASP.NET support and additional modules for hosting web applications.
Understanding how IIS processes an HTTP request from arrival to response.
A website is a container for web content, identified by bindings (IP, port, hostname).
Create a new website by specifying its name, physical path, and host header binding.
Add an HTTPS binding to the same site so it can serve encrypted traffic on port 443.
IIS organizes content in a three-level hierarchy that controls isolation and configuration scope.
Application pools isolate websites by running them in separate worker processes.
Create a dedicated application pool for each website to ensure process isolation.
Set the .NET runtime version and identity type for the pool.
Recycling restarts worker processes to recover memory and maintain stability.
Disable the default 29-hour time-based recycle and set a private memory limit instead.
Schedule recycling at a specific off-peak time to avoid impacting users.
Extend website functionality by mapping additional paths.
A virtual directory maps a URL path to a folder on a different drive without its own app pool.
A web application gets its own configuration scope and can run in a separate app pool for isolation.
Control what users see when they browse to a directory without specifying a file.
Insert a custom default document at the top of the priority list so IIS serves it first.
Enable directory browsing only on specific paths like a document library, never on the whole site.
Secure your websites with HTTPS using SSL/TLS certificates.
Generate a self-signed certificate for testing HTTPS before purchasing a production cert.
Bind the certificate to the HTTPS binding so IIS presents it during the TLS handshake.
Properly configuring TLS is critical for protecting data in transit.
Require SSL so the site rejects any plain HTTP connections.
IIS supports multiple authentication schemes for different scenarios.
Enable Windows Authentication so domain users get seamless SSO on the intranet.
Disable anonymous access so every user must authenticate before viewing content.
Choosing the right authentication method depends on your environment and security requirements.
Control access to specific URLs, directories, or files based on user identity and roles.
Install the URL Authorization module so IIS can enforce access rules per URL path.
Define authorization rules in web.config to restrict access to a specific AD group.
Request filtering is IIS's first line of defense against malicious requests.
Block dangerous file extensions so users cannot download backup or source files.
Set a maximum upload size to prevent oversized requests from consuming server resources.
Configure how IIS processes and optimizes web requests.
Enable static compression to gzip CSS, JS, and HTML files for faster page loads.
Enable dynamic compression for server-generated responses like API output.
Block .config files from being downloaded to prevent sensitive configuration leaks.
IIS logging captures detailed information about every request for troubleshooting and auditing.
Set the logging format to W3C Extended, which provides the most customizable field selection.
Move log files to a dedicated drive to keep the system volume from filling up.
The IIS Manager console provides a graphical interface for all configuration tasks.
Launch IIS Manager directly from the command line or Run dialog.
If the management console is not installed, add it as a Windows feature.
The web.config file is an XML configuration file that controls IIS behavior for a specific site or directory.
IIS includes a built-in FTP server for file transfer services.
Install the FTP Server role with all sub-features including FTP extensibility.
Create an FTP site pointing to a dedicated file share directory.
Enable basic authentication so FTP users can log in with AD credentials.
Web Distributed Authoring and Versioning (WebDAV) allows clients to edit web content remotely over HTTP.
Install the WebDAV Publishing feature to enable remote file editing over HTTP.
Enable WebDAV authoring on a specific site so clients can upload and edit files.
Map the WebDAV share as a drive letter in Windows Explorer for easy file access.
The WebAdministration and IISAdministration modules provide comprehensive PowerShell management.
Import the WebAdministration module for the IIS: PSDrive and legacy cmdlets.
Use Get-Website or Get-IISSite to list all hosted sites, depending on which module you prefer.
Navigate the IIS: PSDrive like a file system to browse sites and app pools.
Export a site's full configuration to XML for backup or migration to another server.
Practice IIS configuration through both interfaces.