How to Set Up a Custom 404 Page with .htacess

391

How to Set Up a Custom 404 Page with .htacess

A 404 is a mistake message that is indicated when the customer program sends an appeal to the web server for a document that is not display on the server. 404 lapse message implies the customer can effectively speak with the server however couldn’t discover the asked for record on the server. This message can occupy the clients from effectively scanning the webpage and the greater part of the clients wind up shutting the site. Consequently, it gets to be vital to make a 404 custom lapse page to help the clients to explore crosswise over other suitable choices introduce on the site.

how-to-setup-custom-404-page-in-htaccess-w3ctrl-hacker

A 404 error may display any of the following options:-

Sorry, the page you were looking for in this blog does not exist.

Sorry. The page you’re looking for seems to have gone missing.

Whoops… This page can’t be found etc.

A pleasant answer for this issue is setting up a custom 404 slip page with the assistance of .htaccess record. Firstly, you have to make a custom 404 page which you need to show to your clients. At that point continue by taking after the steps given beneath:-

Steps

1- open your  .htacess file on the root of your web server. If you are able to find before open file system check hidden files checkbox in your cpanel.

2- If you not found .htaccess file on your cpanel then make new file though notepad . just open notepad and save a file with .htaccess extension.

3- Add the those line in your htaccess –

ErrorDocument 404 /404page.php

Or

ErrorDocument 404 /404page.html

where “404page” is the name of the custom page which you want to show instead of the error message.

4- Upload the file on the root of the web server.

Enjoy 🙂

keyboard_arrow_up