Welcome to We Web Hosting


How to create a custom error page in cPanel

You are here:
< All Topics

You have 2 options for setting a custom error page.

Option 1

Use the “error pages” icon in cPanel

Option 2 (manual)

To accomplish this, create a file called .htaccess in the same directory as the script. The filename must be exact and most text editors will allow you to save a file with this filename. If you already have a .htaccess file, you can edit it. Either way, add the line:


ErrorDocument 404 /my_404.html

The URL is relative to your website root (for instance my example would display http://www.my-domain.com/my_404.html. You can replace 404 with whatever HTTP status code you want to display the custom error page for.

Table of Contents

Copyright © 2021 WeHost All Rights Reserved.