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.
Windows Tutorial:
On this page, we offer quick access to a list of Windows tutorials.
Tutorial IIS – Redirect the error 404 to a page
Start the application named: IIS Manager.
On the IIS Manager application, select your website.
On the right part of the screen, access the option named: Error pages.
Select the desired error number and click on the Edit option.
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.
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.
Optionally, you may use the CURL command of a Linux computer to test the header configuration.
Here is the command output.
Congratulations! You redirected the error 404 to a URL on the IIS server.