How to Create Custom Error Pages in DirectAdmin #
Error pages are HTML pages shown to visitors in specific situations — for example, a custom 404 message when someone tries to access a page that doesn’t exist.
How to Set Up a Custom Error Page #
- Log in to your DirectAdmin control panel by accessing https://yourdomain:2222
- Locate and click the Custom Error Pages link
- Here, you can edit four error types:
– 401 Unauthorized
– 403 Forbidden
– 404 Not Found
– 500 Internal Server Error - Let’s say you want to edit the 404 file. Click the 404.html link.
- A simple HTML editor will open. Make the desired changes. Finally, save the page by clicking the Save As button. Do not change the file name.
- Test it by accessing a file that doesn’t exist on your server, like domain.com/test1234.html
A Note for WordPress Sites #
If your site runs on WordPress, this tool usually won’t change what visitors see for a typical “not found” request. WordPress handles its own routing and renders 404 errors using your active theme’s `404.php` template, bypassing the server-level error page this tool edits. This DirectAdmin tool is better suited for non-WordPress content or static parts of a site.
To customize your WordPress 404 page, you’ll need to edit your theme’s `404.php` template (via File Manager or FTP) or use a 404-page plugin. Contact us if you’d like help customizing it.