Knowledge Base
How to Create Custom Error Pages in DirectAdmin
Custom 404 and Error Pages
Replace default error pages with your own branded versions.
Using DirectAdmin
- Log into DirectAdmin
- Click Custom Error Pages
- Select an error type (e.g., 404 Not Found)
- Enter your custom HTML
- Click Save
Common Error Codes
- 400 - Bad Request
- 401 - Authorization Required
- 403 - Forbidden
- 404 - Not Found (most common)
- 500 - Internal Server Error
Using .htaccess
Add to your .htaccess file:
ErrorDocument 404 /errors/404.html ErrorDocument 500 /errors/500.html
Best Practices for 404 Pages
- Include your site navigation
- Add a search box
- Link to your homepage
- Suggest popular pages
- Keep your branding consistent
- Consider adding contact information
Example 404 Page
<h1>Page Not Found</h1> <p>Sorry, the page you're looking for doesn't exist.</p> <p><a href="/">Return to Homepage</a></p>