{"id":36634,"date":"2020-02-04T08:57:24","date_gmt":"2020-02-04T16:57:24","guid":{"rendered":"http:\/\/www.bruceclay.com\/blog\/?p=36634"},"modified":"2023-01-31T13:02:39","modified_gmt":"2023-01-31T21:02:39","slug":"microsoft-iis-custom-404-error-page-configuration","status":"publish","type":"post","link":"https:\/\/www.bruceclay.com\/blog\/microsoft-iis-custom-404-error-page-configuration\/","title":{"rendered":"How to Configure a Custom 404 Error Page in Microsoft IIS Server"},"content":{"rendered":"
<\/p>\n
The 404 error page is a generic, browser-issued webpage that tells a visitor when a page they are looking for can\u2019t be found. A custom 404 error page, on the other hand, is a specially designed page that delivers the same message but in a more helpful, user-friendly way.<\/p>\n
It can tell the visitor what\u2019s going on and what to do next. It can even help save a sale<\/a>.<\/p>\n This post walks through the steps of how to add an IIS custom error 404 page if you\u2019re a small business administering your own Microsoft IIS server either directly or through a hosting provider. In this post:<\/strong><\/p>\n <\/a><\/p>\n There are several popular (and many more besides) software programs used to store and host webpages, called servers. If you\u2019re not sure which server you use, contact your web host and they\u2019ll tell you.<\/p>\n If they say Apache \u2014 and it very well might be since it\u2019s one of the most widely used servers on the web \u2014 leave this post and read How to Configure a Custom 404 Error Page \u2014 Apache Server Edition<\/a>.<\/p>\n Not using Apache? There\u2019s a high chance you\u2019re using another very popular server, Microsoft IIS. Another way to tell that you\u2019re using Microsoft IIS is if your website is programmed in .NET<\/em> or another Microsoft stack, such as ASP<\/em>.<\/p>\n So you\u2019re using Microsoft IIS? Let\u2019s begin.<\/p>\n Putting in place a custom 404 error page in Microsoft IIS takes four steps:<\/p>\n <\/strong> If you\u2019d like a primer on how to do the first step, visit How to Design a 404 Error Page That Saves a Sale<\/a>.<\/p>\n Before diving into the process, it\u2019s important to note a potential complication regarding your IIS web server. If your website resides on a dedicated server (one that isn\u2019t shared), you\u2019re good to go with the steps below.<\/p>\n If your website lives on a shared server run by a third-party hosting provider, only the administrator is allowed to make changes to your server files. In other words, you will have to contact the hosting provider before you can gain access to the server and implement the changes outlined below. Unfortunately, this might take a while \u2013 but hopefully it\u2019s a brief setback.<\/p>\n Another way to get administrative rights back in your power if you\u2019re on a shared IIS server is to install an ISAPI_Rewrite plug-in into IIS. ISAPI stands for Internet Server Application Program Interface, and you can easily purchase this software from several places. Helicon Tech (www.isapirewrite.com) creates a good version of the software.<\/p>\n Ready to go? Here\u2019s how to tell your server to replace a generic 404 error with your new and improved page.<\/p>\n With administrative rights to make changes to your server files, you can now get in and make the changes. Exactly how to make those changes depends on the version of the software that you\u2019re using.<\/p>\n Here\u2019s a brief guide for IIS 8.5 followed by another set of instructions for IIS 10.0. Step 1: Open the \u201cInternet Information Services (IIS) Manager\u201d tab.<\/strong> This is located on the Task Bar below \u201cServer Manager,\u201d and then underneath \u201cTools.\u201d<\/p>\n Step 2: Identify website or application.<\/strong> Go to the \u201cConnections\u201d pane and click the plus sign (+) next to your server name to expand it. Then expand \u201cSites.\u201d Next, find the site or application you want to set a custom error page for.<\/p>\n Step 3:<\/strong> Open \u201cError Pages.\u201d<\/strong> You can do this by double-clicking \u201cError Pages,\u201d located in the home pane.<\/p>\n Step 5: Enter the HTTP \u201cStatus Code.\u201d <\/strong>When you see the dialog box \u201cAdd Custom Error Page,\u201d enter \u201c404\u201d underneath \u201cStatus Code.\u201d<\/p>\n Step 6: Select \u201cExecute a URL on this site,\u201d located in the same dialog box. <\/strong>This allows you to serve dynamic content, such as an asp file for the custom error page you\u2019ve created.<\/p>\n Step 7: Enter the URL. <\/strong>Within the text box, \u201cFile path,\u201d type the URL of the custom error page, and then click \u201cOK.\u201d Note:<\/strong> Make sure when selecting this option that the path is a relative path.<\/p>\n Once you hit \u201cOK,\u201d your custom 404 error page should be live and doing its job. Step 1: Open the \u201cInternet Information Services (IIS) Manager\u201d tab.<\/strong> This is located on the Task Bar below \u201cServer Manager,\u201d and then underneath \u201cTools.\u201d<\/p>\n Step 2: Identify website or application. <\/strong>Go to the \u201cConnections\u201d pane and click the plus sign (+) next to your server name to expand it. Then expand \u201cSites.\u201d Next, go to the site or application you want to set a custom error page for.<\/p>\n Step 3: Open Error Pages. <\/strong>Double-click the \u201cError Pages\u201d icon located in the home pane; click \u201cEdit.\u201d<\/p>\n Step 4: Enter the HTTP Status Code. <\/strong>When you see the dialog box \u201cEdit Custom Error Page,\u201d enter \u201c404\u201d underneath \u201cStatus Code.\u201d<\/p>\n Step 6: Select \u201cExecute a URL on this Site.\u201d <\/strong>In the same dialog box, select \u201cExecute a URL on this site\u201d so that you can serve your custom page.<\/p>\n Step 7: Enter the URL. <\/strong>Within the text box \u201cURL (relative to the site root),\u201d type the URL of the custom error page and then click \u201cOK.\u201d<\/p>\n Step 8: Select \u201cEdit Feature Settings.\u201d <\/strong>Once you hit \u201cOK,\u201d right-click on the 404 error and select \u201cEdit Feature Settings.\u201d<\/p>\n Step 9: Choose \u201cCustom Error Page,\u201d and then click \u201cOK.\u201d<\/strong> After you click this last OK, your new page should be live and ready. Whether you\u2019re using IIS version 8.5 or 10.0, it\u2019s time to check if your new page is working properly. The easiest way to test your new page is to visit a bogus page on your website. Go to your web browser and type in a fake page on the site, such as www.mywebsite.com\/bogus-cheeseburgers.<\/p>\n If the new custom page comes up, congratulations! You\u2019ve properly set up a custom 404 error page for the Microsoft IIS server.<\/p>\n If you\u2019re still getting the generic 404 error page, it\u2019s time to check a common problem and try again. Note: If your website is programmed in something other than C#, VB.NET, JavaScript or VBScript, you can still use the steps outlined above, but you\u2019ll have to learn how to do it depending on your programming language\/framework.<\/p>\n No one enjoys getting a bite of something they don\u2019t want. From a visitor\u2019s point of view, coming across a 404 error page on your website is disappointing and confusing.<\/p>\n And depending on what they get instead of what they wanted, a visitor can lose their appetite. In fact, it\u2019s not uncommon for a consumer who encounters a 404 error page to immediately click the back button and exit the site completely.<\/p>\n A sad ending to a potential conversion.<\/p>\n The good news is that a custom error 404 can save the day.<\/p>\n While it might not be the main course that your visitors are craving, a custom error page can serve as the amuse-bouche that opens their appetites and leads them to the final entr\u00e9e.<\/p>\n Help your hungry visitors get over the disappointment of reaching a generic error by creating and setting up a custom 404 page.<\/p>\n Adding a custom 404 error page is just one of the best practices in SEO. There’s so much more to learn, and you can do just that through our official Bruce Clay SEO Training<\/a> course.\u00a0<\/em><\/p>\n","protected":false},"excerpt":{"rendered":" The 404 error page is a generic, browser-issued web page that tells a visitor when a page they are looking for can\u2019t be found. A custom 404 error page, on the other hand, is a specially designed page that delivers the same message but in a more helpful, user-friendly way that honors the brand. It can tell the visitor what\u2019s going on and what to do next. It can even be crafted to save a sale.<\/p>\n This post walks through the steps of setting up a custom error 404 page if you\u2019re a small business administering your own IIS server either directly or through a hosting provider.<\/p>\n\n
How to Identify Your Web Server<\/h2>\n
<\/a>
\n
\nThis post skips to Step 3. We assume you\u2019ve already created a branded, custom 404 error page. We also assume you\u2019ve put this page in the appropriate directory so that IIS has it available to serve. If that\u2019s correct, then you\u2019re in the right guide.<\/p>\nA Possible Microsoft IIS Complication<\/h3>\n
How to Program Microsoft IIS to Deliver Your Custom Error Page<\/h2>\n
\n<\/a><\/p>\nHow to Prepare Custom 404 Error Pages in IIS 8.5<\/h3>\n
<\/a><\/p>\n
<\/a><\/p>\n
\n<\/a><\/p>\nHow to Prepare Custom 404 Error Pages in IIS 10<\/h3>\n
\n<\/a><\/p>\nTest Your New and Improved Custom 404 Error Page<\/h2>\n
\n<\/a><\/p>\nTroubleshooting in IIS 8.5 and 10.0<\/h2>\n
\n
\n
Simple Change, Big Results<\/h2>\n