Every internet surfer has encountered the dreaded 404 web page not discovered error message.
The generic error page is horrible to have a look at and it does not encourage net guests to explore extra of your site.
Think about with the ability to setup a custom error message web page that regarded good, advised the visitor what had gone wrong and then urged some various links to other places in your web site, corresponding to the home web page, sitemap or perhaps a search page.
If the customer wanted to, they might then go to other elements of your site.
It is extremely easy to setup a customized 404 error page (The 404 error is the error number returned when a page or directory will not be discovered in your website).
The best option to redirect visitors that encounter a 404 is to either send them to your websites house web page or to your sitemap web page
We do this by inserting an one line of code in your websites .htaccess file
ErrorDocument 404 /sitemap.html
This may redirect all 404 error messages to the sitemap page.
The trail to the page you want to show, should already exist in your internet server, otherwise the online server will tie itself up in a by no means ending loop.
The full path to the error web page must be specified and it should be relative to the foundation path of that account (keep in mind, inserting a / at the front of a file identify or directory specifies that it's relative to the foundation directory).
To make a customized error web page, simply create a web page utilizing your favorite webpage editor akin to MS FrontPage or DreamWeaver. The page can include anything you want, comparable to photographs, links etc. Save the file as one thing straightforward to recollect (akin to 404errors.html)
I would then recommend you make a directory immediately off your /public_html/ folder and call it "error" and place your error recordsdata in here.
This would now mean that your .htaccess command line would now appear to be:
ErrorDocument 404 /error/404errors.html
Now at any time when a 404 error was generated in your site, your custom error page shall be displayed, and hold your web guests happy.
Author Resource:
If you need extra info about html redirect code pay a visit to Mary Kenwodien's website instantly!