2.7.1.1.8. Setting up your own 404 error page
To do this, you need to root directory of the site create a file named .htaccesscontaining code like this:
ErrorDocument 404 /404.html
After that, create a file in the root directory of the site 404.html
and write in it the code of the page that will be shown in case of 404 errors.
Similar settings can be made for errors 401, 403.
Important points:
- For some CMS, this method of generating errors is not suitable, since all requests are redirected to internal CMS scripts.
- Custom 404 page will not work correctly for URLs that mention
pagespeed
if included optimization settings... To fix the problem, disable optimization settings or not use links with similar keywords.
To customize your 404 error page in popular CMS, the following instructions are available: