Would you like to learn how to redirect the 404 error to a specific URL on the IIS server? In this tutorial, we are going to configure the IIS server to redirect the 404 error to a specific page.

• Windows 2012 R2
• Windows 2016
• Windows 2019

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Tutorial IIS – Redirect the error 404 to a page

Start the application named: IIS Manager.

Start IIS Windows

On the IIS Manager application, select your website.

On the right part of the screen, access the option named: Error pages.

IIS - Error pages

Select the desired error number and click on the Edit option.

IIS - Redirect error page

To redirect the error page, perform the following configuration:

• Response with a 302 request – Yes.
• Absolute URL – Enter the new destination URL.

Click on the OK button.

IIS - Redirect error 404 URL

In our example, the IIS server will redirect the error 404 to a specific URL.

To test the installation, open the Chrome browser on a remote computer and try to access a page that does not exist.

In our example, the following URL was entered in the Browser:

• http://18.237.128.221/aaabbbccc

Use the page inspection feature of the Chrome browser to verify the IIS headers.

IIS - Redirect error to URL

Optionally, you may use the CURL command of a Linux computer to test the header configuration.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Congratulations! You redirected the error 404 to a URL on the IIS server.