How to add custom error pages
- Category : cPanel Question
- Posted on : Mar 22, 2020
- Views : 877
- By : HostSEO
Error pages are displayed when a user enters a wrong/outdated URL or when one is not authorized to access a specific directory of your web space. cPanel allows you to customize the default view and adjust the way the error is displayed:
for cPanel paper_lantern theme
for cPanel x3 theme
for cPanel paper_lantern theme:
1. Log into your cPanel.
2. Navigate to Advanced section > Error Pages menu:
3. Select the domain name in from Managing drop-down menu and click on the error you wish to change:
If you cannot find the needed error code in Edit Common Error Codes tab, switch to Show All HTTP Error Status Codes:
4. Once the error code is selected, you will be taken to HTML editor that provides the following tags:
- Requested URL: displays the intended URL the visitor is trying to view.
- Server name: displays the web site's server name.
- Visitor's browser: displays the visitor's browser type such as Internet Explorer, FireFox, Netscape, etc.
- Redirect Status Code: displays the type of code in the 300-307 range, to learn more follow this link.
Make sure that you Save the changes.
5. After that the .shtml file will be placed to the root directory of your website:
6. In order to connect .shtml to your website, you need to add the corresponding rule to .htaccess file.
If you cannot locate .htaccess, enable Show Hidden files (dotfiles) option in Settings menu:
If there is still no .htaccess file in your File manager, feel free to create a new one using File option:
7. After that right-click on the file and use Edit option:
Add the following rule:
ErrorDocument 500 /500.shtml
Note, that error code and file name should be adjusted accordingly. For example, if you wish to connect 404.shtml, the rule should look like:
ErrorDocument 404 /404.shtml
for cPanel x3 theme:
1. Log into your cPanel.
2. Navigate to Advanced section > Error Pages menu:
3. Select the domain name in from Managing drop-down menu and click on the error you wish to change:
If you cannot find the needed error code in Edit Common Error Codes tab, switch to Show All HTTP Error Status Codes:
4. Once the error code is selected, you will be taken to HTML editor that provides the following tags:
- Requested URL: displays the intended URL the visitor is trying to view.
- Server name: displays the web site's server name.
- Visitor's browser: displays the visitor's browser type such as Internet Explorer, FireFox, Netscape, etc.
- Redirect Status Code: displays the type of code in the 300-307 range, to learn more follow this link.
Do not forget to Save the changes.
5. After that the .shtml file will be placed to the root directory of your website.
Move to File Manager menu in cPanel, select Document root for option and your domain from the drop-down menu. Make sure that Show Hidden Files (dotfiles) is enabled:
6. In order to connect .shtml to your website, you need to add the corresponding rule to .htaccess file.
If you cannot locate .htaccess file in your website root directory, feel free to create a new one using New File option:
7. After that right-click on the file and use Edit option:
Add the following rule:
ErrorDocument 500 /500.shtml
Note, that error code and file name should be adjusted accordingly. For example, if you wish to connect 404.shtml, the rule should look like:
ErrorDocument 404 /404.shtml
That's it!
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu