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:
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.