Setting a 404 Error Page via the .htaccess File

Table of Contents

In this tutorial, we will explain How to Set a 404 Error Page via the .htaccess File.

The HTTP 404, 404 Not Found and 404 (pronounced “four oh four”) error message is a Hypertext Transfer Protocol (HTTP) standard response code, in computer network communications, to indicate that the client was able to communicate with a given server, but the server could not find what was requested.

To set the 404 Error file via htaccess File it’s so easy.
First login to your site’s file manager.Preferred via WinSCP.

Go to Tools and Preferences.

WinSCP Tools-Preferences

When Preferences tab is opening, go to Panels tab and check Show Hidden Files.

Enable Show Hidden Files

Click Ok to save this Preference.After login to your site, go to your web directory and edit .htaccess file.

Add this line to .htaccess file to set 404 page :

ErrorDocument 404 “<H1>Page not found</H1>”

After editing .htaccess file, save the changes.

You have successfully Set a 404 Error Page.To see effects go to www.yourdomain.com/404ErrorPage.

Enjoy!

 

Share on
Facebook
Twitter
LinkedIn
Print
VPSie Cloud service

Unlock Your

20% Discount

The First 3 orders get 20% discount! Try Sign up on VPSie to get a chance to get the discount.