web-cp.net

"open source web hosting control panel"

← Back to Articles

DNS Management with Web-CP

2025-09-10 · Mike Reynolds guide dns

Web-CP provides a full-featured DNS management interface built on top of BIND (named). This article covers zone management, record types, templates, and best practices.

DNS Architecture in Web-CP

Web-CP manages BIND configuration files directly. When you create or modify DNS records through the control panel, web-cp:

  1. Updates the zone file
  2. Increments the serial number
  3. Validates the zone with named-checkzone
  4. Reloads the zone with rndc reload

This happens in real-time — changes take effect within seconds on your nameserver.

Zone Templates

Server administrators can define DNS templates that are applied when new domains are created. Templates use variables that are substituted at creation time:

VariableDescription
%%DOMAIN%%The domain name
%%IP%%The domain’s IP address
%%NS1%%Primary nameserver
%%NS2%%Secondary nameserver
%%MAIL%%Mail server hostname

Default Template Example

$TTL 86400
@   IN  SOA %%NS1%%. admin.%%DOMAIN%%. (
        %%SERIAL%%  ; serial
        3600        ; refresh
        1800        ; retry
        604800      ; expire
        86400       ; minimum
    )

@       IN  NS  %%NS1%%.
@       IN  NS  %%NS2%%.
@       IN  A   %%IP%%
www     IN  A   %%IP%%
mail    IN  A   %%IP%%
@       IN  MX  10 mail.%%DOMAIN%%.

Supported Record Types

Web-CP supports the following DNS record types:

  • A — IPv4 address mapping
  • AAAA — IPv6 address mapping (new in 0.8)
  • CNAME — Canonical name alias
  • MX — Mail exchange with priority
  • TXT — Text records (SPF, DKIM, DMARC)
  • SRV — Service locator
  • NS — Nameserver delegation
  • PTR — Reverse DNS (if your server manages the reverse zone)

Managing Records

Domain Control Panel

Domain owners can manage their DNS records from Domain Settings → DNS Zone. They can add, edit, and delete records within their zone. The interface validates record syntax before saving.

Reseller and Server Panels

Resellers and administrators have access to advanced DNS features:

  • Edit zone templates
  • Manage multiple zones in bulk
  • Configure zone transfers (AXFR)
  • Set per-zone TTL defaults

Best Practices

  1. Always set SPF and DKIM records for email deliverability
  2. Use reasonable TTLs — 3600 (1 hour) is good for most records
  3. Lower TTL before migrations to speed up propagation
  4. Set up secondary DNS for redundancy
  5. Monitor zone file health using the built-in zone checker