1. Home
  2. Computing & Technology
  3. Web Design / HTML

Create a Custom 404 Page on Apache

By Jennifer Kyrnin, About.com

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
Explore Web Design / HTML
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. About.com Web Design A to Z
  5. Books
  6. About Web Design Book
  7. AWD: Chapter 8
  8. How to Create a Custom 404 Page on Apache>

©2009 About.com, a part of The New York Times Company.

All rights reserved.