Creating a custom error page improves user experience, maintains consistency with your brand's identity, and provides helpful navigation.
You can use the configuration file .htaccess to show your visitors a custom-made error page instead of a standard server-returned error code. The most common errors to create pages for are:
- Page Not Found (404)
- Forbidden – Access Denied (403)
Below are the steps to add an already created custom error page and some tips.
Steps to add custom error pages
- Open your File Manager.
- Locate and open the .htaccess file. In some cases, the file can also be found in a subdomain folder. If it doesn’t exist, you can create one.
- Add the following code to the bottom of your .htaccess file:
ErrorDocument 403 https://one-example.com/forbidden.html ErrorDocument 404 https://one-example.com/notfound.html
- Replace https://one-example.com/forbidden.html and https://one-example.com/notfound.html with the location (URLs) of your custom-made error pages.
- Click the Save button in the top-left corner.
Note: If you use our Website Builder and make manual changes to the .htaccess file, the Website Builder will overwrite it every time you republish. Therefore, we recommend always keeping a backup of your custom .htaccess rules.
Tips for effective error pages
- Consistent design: Match the design of your error pages with the rest of your website for a seamless user experience.
- Helpful content: Include a friendly message, links to popular pages, or a search bar to help users find what they’re looking for.
- Easy navigation: A well-designed error page should not prevent a visitor from accessing the website. It should allow the visitor to continue browsing without needing to use the Back button and should include links or at least keep the top menu visible.
- Contact information: Provide a way for visitors to contact you if they continue to encounter issues.
Related articles: