Custom Error pages

If you want to have error pages on your site, such as a 404 page not found, you can do it in the following way:

Log in to cPanel – File Manager – public_html
Create a file called “.htaccess” (including the dot, but check if you already have one)
In that file, enter the following:

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html

Then, in the public_html folder, create HTML pages such as 403.html, 404.html, and 500.html, and when a visitor tries to open a link that doesn’t exist on your site, they will see your 404.html page.

Of course, you can also redirect visitors to an existing page if you don’t want them to know you have such pages:

ErrorDocument 404 /index.html

How to revert to the beginning?

Simply delete the HTML pages and that’s it.

Scroll to Top