Skip to content

Knowledgebase

Making persistent per-domain web-server changes in DirectAdmin

control-panels, domains-dns

DirectAdmin generates virtual-host configuration from managed templates and domain settings. Use its supported custom configuration locations when a domain needs a special directive. Editing a generated file directly can work briefly and then disappear during a rebuild or account update.

What you need before you begin

Identify the exact domain, active web-server stack and required directive context. Back up existing custom values and understand the effect on HTTP and HTTPS virtual hosts. Server-level customization requires an authorized administrator.

01 Make persistent per-domain web-server changes in DirectAdmin

  1. Open administrator Custom HTTPD Configuration and select the domain. Review the generated context and available customization slots for the actual server type.
  2. Add the smallest required domain-specific directive to the supported custom field or template hook. Apache and nginx syntax are not interchangeable.
  3. For a reusable global template change, copy the appropriate vendor template into the documented custom location and track the difference. Avoid replacing an entire current template with an obsolete copy.
  4. Apply the supported configuration rewrite and inspect validation output. Do not reload a service while a syntax error remains unresolved.
  5. Test the intended URL behaviour and an unrelated domain to confirm the change scope. Preserve the final custom snippet and its purpose in your administrative records.

How do I verify a persistent domain configuration change?

Confirm the directive appears in the generated configuration and remains effective after a controlled rewrite. Check error logs, redirects, headers and protected content relevant to the change. Verify that future update review includes the custom template.

Troubleshoot unexpected results

If a directive is rejected, check whether its context and server syntax are valid. A rule valid globally may be invalid inside a virtual host or location block. Remove only the new customization and regenerate to recover. Do not repeatedly edit generated output or disable configuration validation to force a rule into service.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution