DNS Management with Web-CP
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:
- Updates the zone file
- Increments the serial number
- Validates the zone with
named-checkzone - 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:
| Variable | Description |
|---|---|
%%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
- Always set SPF and DKIM records for email deliverability
- Use reasonable TTLs — 3600 (1 hour) is good for most records
- Lower TTL before migrations to speed up propagation
- Set up secondary DNS for redundancy
- Monitor zone file health using the built-in zone checker