How do I set up a Custom "404 Not Found" Page on my website?

Step 1:

Design your custom 404 webpage and save it on the server. To keep my custom error pages organized, I created a folder off of my website root directory called “errorPages” and saved my not found file as 404.html.


Apache     Windows

Apache

Step 2:

If you are using an apache server, you need to open your .htaccess file (or create one if it doesn’t exist). This file should be titled .htaccess and located in your website’s root directory.

Step 3:

Add a line in your .htaccess file mapping the 404 error to the page you just created. ErrorDocument 404 http://www.yourdomain.com/errorPages/404.html


Windows

Step 2:

If you are using a windows server, you need to open IIS and navigate to your website. Once your website is selected, click on the icon for error pages.


Step 3:

Once in Error pages, highlight 404 and select Edit. Click the checkbox for Execute URL and type the path of your error page.



Still have questions? Send an email to AllScrawl@gmail.com

Comments