How do I set up a custom 404 error page in DirectAdmin?

A custom 404 page turns a dead end into a helpful experience when visitors reach a URL that does not exist. Instead of a blank browser error, you can show your branding, a friendly message, and links back to your site. This guide explains how to set one up in DirectAdmin.

What a 404 page is #

A 404 error means the requested page was not found. By default the server shows a plain message, but you can replace it with your own page that keeps visitors engaged and pointed toward working content.

Option 1: Use the Custom Error Pages tool #

  1. Log in to DirectAdmin.
  2. Go to Account Manager > Custom Error Pages.
  3. Select the 404 error.
  4. Enter or edit the HTML for your custom page.
  5. Save.

Option 2: Use .htaccess #

Alternatively, create your error page as an HTML file (for example, 404.html) in your public_html folder, then add a line to your .htaccess file pointing to it, such as ErrorDocument 404 /404.html.

What to include on a good 404 page #

  • A clear message that the page was not found.
  • A link back to your homepage.
  • A search box or links to popular pages.
  • Your branding, so it still feels like your site.

Troubleshooting #

  • Custom page not showing: confirm the file path in .htaccess is correct.
  • WordPress sites: the theme usually controls the 404 page, so edit it there instead.

Need help? #

If your custom error page is not appearing, our support team can help over live chat.

What are your feelings

Your Account