Any issues with adjusting your .htaccess file fall under our Best Effort support policy. Best Effort does not include content management, coding or designing for your websites. We may also direct you to a better resource for your issue, such as Plugin Developer, Designer, Software Author etc. Best Effort is not covered under the same SLA's as our supported services and does not guarantee any future support for any issue. Please understand that Best Effort issues may take longer to resolve.
Error pages are a part of any website. No matter what, website visitors will sometimes encounter error pages. If you use custom error pages, however, you can turn an error page into a positive user experience. This tutorial will show you how to add custom error pages to your websites.
Before you set up your error pages, you'll need to create your error pages. You can do this, however, you'd like: hand coding your page, using a site builder or another way. When you're done building your error page, save the file so it can be uploaded to your server.
Now to set up custom error pages, you will edit your website's .htaccess file. Before editing your .htaccess file, make sure you're also familiar with SFTP.
- Before editing your .htaccess file, upload your customized error pages to your server. You can do this via SFTP. Put these files in the content directory for your website.
- Log into your server via SFTP using the FTP program of your choice.
- Download the .htaccess file that corresponds to the domain where you want to use custom error pages.
- Open this file in a text editor and add this information:
# serve custom error pages
ErrorDocument 400 /errors/400.html
- Replace /errors/400.html with the file path to an error page you have uploaded. This example has "400," for a 400 error.
- Add as many lines as needed, changing the error number and the file path as needed.
ErrorDocument 404 ETC...
- When you're done adding to your .htaccess file, save and exit the file. Then upload it back to the directory you got it from.
- Finally, test your website to make sure your error pages are functioning.