1. Technology

How To Create a Custom 404 Page on Apache

By

Apache makes it easy to create a custom 404 page for your Web server. Simply edit the file and then change the config file to point to it.

Difficulty: Easy
Time Required: 15 minutes

Here's How:

  1. Create a Web page that will be your 404 document.
  2. Open yourhttpd.conffile for editing (you'll probably have to login as root to edit it).
  3. Find the line that reads
    ErrorDocument 404 /404.html
  4. Change the third entry to the URI you would like to display, e.g.
    ErrorDocument 404 /new_404.html
  5. Restart your Web server.

What You Need

  • Apache Web Server
  • Text Editor

©2014 About.com. All rights reserved.