Using Custom Error Pages
Posted by on 27 February 2014 05:55 AM
|
|
We’ve all seen the dreaded 404 error messages that are unfortunately a fact of the internet. If someone is browsing your website and clicks an invalid link they will likely be directed to a vague and boring 404 page… and that’s not ideal. With just a little bit of work it’s very easy to create a custom 404 error page just like ours: http://asmallorange.com/404. You will need two things to get started:
You’ll need an .htaccess file to begin implementing your new 404 message.
If you already HAVE an .htaccess file in the public_html folder of your cPanel account, then simply add the text below to the top of the file and save it: ErrorDocument 404 /404.html Note: this is assuming that you have named your 404 error page ‘404.html’ and placed it inside the public_html folder. If you have not named it that way, make sure the code shown above reflects the proper name of your 404 file.
If you DO NOT already have an .htaccess file in the public_html folder then you’ll just need to create one:
Once the file has been created add the code shown below to the file and save it again: ErrorDocument 404 /404.html Note: this is assuming that you have named your 404 error page 404.html and placed it inside the public_html folder. If you have not named it that way, make sure the code shown above reflects the proper name of your 404 file.
Now, all that’s left to do is upload this file via either FTP or cPanel File Manager, and make sure that it’s in the public_html folder of your cPanel account. You’re not restricted to only having a custom 404 error page… there are several error codes that you can create custom pages for, including: Client Request Errors Server Errors If you need any assistance with this, please do not hesitate to get in touch with our support team! We’re here to help. | |
|