Custom Designs for 404 Page Not Found or 301 Redirection To Homepage

404 error pages happen when users are trying to visit a broken link. The common reasons are mistyped URLs, perhaps the site owner removed the page, or the page never existed. This error page is just as important as any other live page, in its potential to generate additional web traffic and business conversions.

Default 404 Error Page

404 Error Page On Static Website

We can custom design the error page by adding an error code in the .httaccess file, e.g. ErrorDocument 404, so any invalid link pointed to will be redirected to

Redirect 404 Error Page to Home Page

Some webmasters request to skip showing the 404 page and immediately redirect to the home page instead.

For static websites, you can add the following code to the .httaccess file, e.g. ErrorDocument 404

For WordPress sites, you go to Dashboard > Appearance > Editor > 404.Template (404.php), and replace it with the example code.


header(“Status: 301 Moved Permanently”);