Deploying IIS on Windows Server 2025 | Easy Setup Guide

Posted on

Deploying IIS on Windows Server 2025 | Easy Setup Guide

Deploying IIS on Windows Server 2025 | Easy Setup Guide

This tutorial provides a comprehensive guide for Deploying IIS on Windows Server 2025. IIS (Internet Information Services) is a robust Microsoft web server integrated into Windows Server 2025. Its support for various web technologies, including ASP.NET and PHP, makes it an excellent choice for web hosting. This article will outline the steps for deploying IIS on Windows Server 2025.

You can now proceed to the guide steps below on the Orcacore website to learn how to install and configure Internet Information Services IIS in Windows Server 2025.

To complete the Windows Server 2025 IIS configuration, you must log in to your Windows Server and follow the steps below.

Note: Also, you can check the Video Tutorial for IIS in Windows Server 2025:

1. Open Server Manager and Enable IIS on Windows Server 2025

To install IIS on your Windows Server 2025, you must search for Server Manager and open it. Then, you must click on Add Roles and Features.

Server Manager Add Roles Windows Server 2025

In the Before You Begin window, click Next to continue. You will see the Select Installation Type section, from there, you must check the box next to the Role-based or feature-based installation and click Next to continue.

Select Installation Type

Next, we must Select the Destination Server. Because we are setting up IIS in a local machine, we chose the Select a server from the server pool. Click Next to continue.

Select Destination Server

Now you will see the Server Roles section. From the roles, find the Web Server (IIS) and check the box next to it. It will open a pop-up window, and from there add the additional features. Then, click Next to continue.

Select Server Roles, IIS Windows Server 2025

Then, you can Select Features and Select Role Services for IIS. You can always come back and add more later, so press Next to install the defaults.

Select Features and Role Services

Finally, Confirm the Installation Selections and press the Install button to Install IIS on Windows Server 2025.

Note: With the standard IIS installation, no reboot is needed. If you remove the role a reboot will be needed.

Confirm Installation Selections of IIS Windows Server 2025

Once your IIS installation is completed, press the Close button.

Finish IIS Setup Windows Server 2025

2. Verify IIS Installation on Windows Server 2025

Now you can verify your IIS setup by accessing the default page. By default, IIS is listening on port 80. You can open a browser and navigate to your localhost or server IP address:

http://localhost
Or
http://serverIP

If you see the following page, it means that your IIS is working correctly on Windows Server 2025.

Verify IIS Installation on Windows Server 2025
IIS in Windows Server 2025

3. Default Site Configuration in IIS Server 2025

By installing IIS, a website called Default Web Site is created by default, which can be used to test the health of IIS. This website is configured to respond to user requests from the HTTP protocol over port 80.

In this guide, we are going to use the default site by getting to know where its document root is and how to host a simple website within it. To do this, follow the steps below.

From the Server Manager, click on Tools and select Internet Information Services (IIS) Manager.

Open IIS Manager

Then, expand the server name and you should see the Default Website. The default site on IIS server 2025 stores its files in a particular directory. To display this information, double-click on it, choose the Manage Website, then, choose the Advanced settings.

Advanced Settings of Default IIS Site

It will open a window for you where you can see the Default Sites information such as files or Document Root. If you want to change the document root, you can click on Physical Path and change the default path. Here we keep the default values.

Physical Path Default IIS Site

Also, you can check the Default Documents which you can specify the default files to return when a client does not request a specific file from the web server. You can click on it to check the documents. You should see something similar to this:

Default IIS Documents

At this point, we want to create an index.html file in the document root and check if it gets loaded in the IIS server 2025. To do this, you can open your Notepad and add the following sample code to it:

<html>
<head>
<title>Welcome To IIS!</title>
</head>
<body>
<h1>Success! It is working correctly!</h1>
</body>
</html>

Once you are done, save the index.html file in the document root path which is the physical path. In our case, it is the default path:

This PC>Local Disk(C:)>inetpub>wwwroot

Then, open a browser and navigate to the localhost or your server IP address:

http://localhost
Or
http://serverIP

You should see the following screen which means it is loaded successfully:

host a simple website in IIS

Conclusion

At this point, you have learned a complete guide for Deploying IIS on Windows Server 2025. IIS in Windows Server 2025 will help you to host your websites and applications efficiently. Hope you enjoy it. Please subscribe to us on Facebook, YouTube, and Twitter.

Also, you may like to read the following articles:

Introduce Windows Server 2025 New Active Directory and New Features

Install and Configure Hyper-V on Windows Server 2022

How to install Git on Windows Server 2022

Setting Up IIS on Windows Server 2022

Defender Antivirus on Windows Server 2022

Install MSIX App on Windows Server 2022

Alternative Methods for Deploying IIS on Windows Server 2025

While the Server Manager GUI provides a straightforward method for deploying IIS on Windows Server 2025, alternative methods offer greater flexibility and automation capabilities. Here are two such approaches:

1. Using PowerShell

PowerShell provides a powerful command-line interface for managing Windows Server, including IIS installation. This method is ideal for scripting automated deployments and ensuring consistent configurations across multiple servers.

Explanation:

The Install-WindowsFeature cmdlet is used to install roles, role services, and features on a Windows Server. The -Name parameter specifies the feature to install, in this case, Web-Server for IIS. The -IncludeManagementTools parameter ensures that the IIS management tools (like IIS Manager) are also installed.

Code Example:

Install-WindowsFeature -Name Web-Server -IncludeManagementTools

To further customize the installation, you can specify individual role services. For example, to install ASP.NET 4.8 and the static content feature:

Install-WindowsFeature -Name Web-Server, Web-Asp-Net45, Web-Static-Content -IncludeManagementTools

This approach allows for a more granular selection of components during the IIS installation process on Windows Server 2025.

2. Using Desired State Configuration (DSC)

Desired State Configuration (DSC) is a management platform in PowerShell that enables you to manage IT and development infrastructure with configuration as code. You define the desired state of the system, and DSC ensures that the system remains in that state.

Explanation:

DSC uses configuration files (MOF files) to define the desired state. The xWebAdministration module provides resources for managing IIS. You would define a configuration specifying that the Web-Server feature should be installed and any specific settings for your website.

Code Example:

First, install the xWebAdministration module:

Install-Module -Name xWebAdministration

Then, create a DSC configuration file (e.g., IISConfig.ps1):

Configuration IISSetup
{
    Import-DscResource -ModuleName xWebAdministration

    Node localhost
    {
        WindowsFeature WebServer
        {
            Ensure = "Present"
            Name   = "Web-Server"
        }

        xWebsite DefaultWebsite
        {
            Ensure          = "Present"
            Name            = "Default Web Site"
            PhysicalPath    = "C:inetpubwwwroot"
            PhysicalCredentials = $null
            State           = "Started"
            Protocol        = "http"
            Port            = 80
            DependsOn       = "[WindowsFeature]WebServer"
        }
    }
}

To apply the configuration:

.IISConfig.ps1
Start-DscConfiguration -Path .IISSetup -Wait -Verbose

This DSC configuration ensures that the Web-Server feature is installed and configures the default website on Windows Server 2025. It defines the physical path, state (started), protocol (http), and port (80). DSC will ensure the server conforms to this configuration and correct any deviations over time, which makes this a very robust solution.

These alternative methods provide more advanced and automated ways to deploy IIS on Windows Server 2025, particularly useful for large-scale deployments and maintaining consistent server configurations. These methods complement the GUI-based approach, offering administrators a wider range of options to suit their specific needs. Remember to consider security best practices when deploying IIS, such as configuring appropriate authentication and authorization settings.

Leave a Reply

Your email address will not be published. Required fields are marked *