PowerDNS WHMCS Module
WHMCS server module for reselling PowerDNS DNS zone management via the PowerDNS HTTP API. Supports configurable zone quotas, 25 DNS record types with allowed-type presets, SOA defaults, name servers, regex blacklists, zone templates, admin server sync, and full WHMCS lifecycle automation.
Description
PowerDNS module WHMCS
Order now | Download | Community
PowerDNS WHMCS module
The PowerDNS WHMCS module transforms your WHMCS installation into a complete, self-service DNS hosting platform. Sell DNS zone management as an independent product or package: each client service grants a configurable quota of DNS zones, allowing clients to create, edit, and delete their DNS zones and records directly from the WHMCS client area. All record updates, additions, and deletions are synchronized in real time with your authoritative PowerDNS server via its high-performance HTTP API.
Administrators maintain complete control over provisioning policies: set maximum zone limits per product package, enforce provider-wide SOA record defaults, assign authoritative name servers, define regex-based blacklists for forbidden domain names, configure auto-provisioned zone templates, and restrict the specific DNS record types clients are permitted to create or edit. The module natively adheres to the WHMCS service lifecycle — suspending a service removes zones from the active DNS server while preserving records in WHMCS, and terminating a service safely cleans up all zone data.
Main features
- DNS zones as a commercial product — Sell DNS hosting packages backed by a PowerDNS authoritative server.
-
Flexible zone quota — Configure maximum zone limits per product package (
0for unlimited). -
Comprehensive DNS record support — Supports 38 standard and modern DNS record types:
A,AAAA,AFSDB,ALIAS,CAA,CERT,CDNSKEY,CDS,CNAME,DNSKEY,DNAME,DS,HINFO,HTTPS,KEY,LOC,LUA,MX,NAPTR,NS,NSEC,NSEC3,NSEC3PARAM,OPENPGPKEY,PTR,RP,RRSIG,SMIMEA,SOA,SPF,SRV,SSHFP,SVCB,TKEY,TLSA,TSIG,TXT, andURI. - Allowed record types restrictions — Restrict which record types clients can add or modify, with one-click presets (All, Web Basics, Web + Mail, Standard, Clear) and interactive badges.
- Modern PUQ UI Toolkit client area — Clean, card-based interface with live quick-filters, inline validation, and dynamic action button spinners (no full-page blocking preloaders).
- Granular SOA controls — Configure provider SOA defaults (Refresh, Retry, Expire, Minimum TTL, Administrator Email) and toggle client permission to edit SOA parameters.
- Authoritative name servers — Attach up to 4 authoritative name servers to every provisioned zone.
- Zone name blacklist — Enforce regular expressions to prevent clients from registering system, infrastructure, or forbidden apex domains.
-
Automated zone templates — Automatically generate boilerplate DNS records upon zone creation using the
{zone}placeholder. -
Reverse DNS (PTR) support — Effortlessly manage IPv4 (
in-addr.arpa) and IPv6 (ip6.arpa) reverse DNS zones and PTR records. - Full WHMCS lifecycle synchronization — Automated provisioning on order acceptance, suspension (server purge with WHMCS record retention), unsuspension (server reprovisioning), and termination (safe complete cleanup).
- Administrative management suite — Real-time zone inspector, server-to-WHMCS zone synchronization, record browser, and manual zone reload/delete directly from the WHMCS service page.
- Conflict prevention & task automation — Duplicate zone conflicts raise automated WHMCS staff To-Do entries without throwing unhandled exceptions to clients.
- Full internationalization — 26 language packages with strict typographical safety and dynamic frontend injection.
- Enterprise license engine — High-availability verification against PUQ licensing servers with offline caching for maximum operational resilience.
System requirements
| Requirement | Minimum |
|---|---|
| WHMCS | 8.x+, 9.x+ |
| PHP | 7.4, 8.1, 8.2, 8.3, 8.4 |
| ionCube Loader | v15+ |
| PowerDNS Authoritative | 4.x+ with HTTP API enabled |
Links
- Product page: https://puqcloud.com/whmcs-module-powerdns.php
- Documentation: https://doc.puq.info/books/powerdns-whmcs-module
- Support: https://puqcloud.com/submitticket.php?step=2&deptid=1
- Community: https://community.puqcloud.com/
Screenshots
Client Area — DNS Zones Dashboard
client-overview.png
Client Area — DNS Records Management
client-records-table.png
Admin Area — Product Module Settings
admin-product-module-settings.png
Admin Area — Service Zones Management
admin-service-zones.png
Changelog
PowerDNS module WHMCS
Order now | Download | Community
v4.0.0 — 16-11-2026
Major architecture update for ionCube 15 compatibility, modern Guzzle HTTP client integration, PUQ UI Toolkit client area upgrade, automated product settings migration, and enhanced security standards.
Architecture & Compatibility
-
38 DNS Record Types Supported — Full support across API, UI, and backend serialization for 38 DNS record types:
A,AAAA,AFSDB,ALIAS,CAA,CERT,CDNSKEY,CDS,CNAME,DNSKEY,DNAME,DS,HINFO,HTTPS,KEY,LOC,LUA,MX,NAPTR,NS,NSEC,NSEC3,NSEC3PARAM,OPENPGPKEY,PTR,RP,RRSIG,SMIMEA,SOA,SPF,SRV,SSHFP,SVCB,TKEY,TLSA,TSIG,TXT,URI. -
Apex & Provider NS Protection — Apex root NS records matching provider nameservers are permanently locked with a lock icon in the UI and enforced in backend validation (
Record type not allowed). Subdomain NS delegations remain fully editable and deletable by the client. -
PowerDNS RFC Normalization — Built-in RFC compliance and auto-canonicalization: strict RFC 1876 coordinate formatting for
LOC, generic hex encoding forTKEY, parameter quote cleanup forHTTPS/SVCB, and automatic apex anchoring for DNSSEC records (DNSKEY,CDNSKEY,CDS,NSEC3PARAM). - High-Performance Batched Provisioning — Template records during zone creation are batched into a single atomic PowerDNS PATCH request, reducing provisioning time from over 35 seconds to under 3 seconds.
-
Unencoded Hooks Architecture (v4.0.0+ / ionCube 15) —
hooks.phpis now completely unencoded with zero business logic, ensuring 100% compatibility with ionCube 15 and WHMCS dynamic hook loading. All hook logic moved tolib/puqPowerDNSHooks.php. -
Guzzle HTTP Client — Replaced procedural cURL calls in both the PowerDNS API client and license verification with WHMCS built-in
\GuzzleHttp\Client, featuring robust error handling, JSON encoding, and timeout controls. - Clean Module Logging — Eliminated repetitive local offline database license checks from the WHMCS Module Log, recording exclusively online license transactions to prevent log clutter.
- PHP 7.4 – 8.4 Support — Full compatibility with PHP 7.4 through PHP 8.4, explicit nullable parameter types, and strict null safety.
- WHMCS 9 & Select2 Dynamic Settings — Modernized product settings dropdown detection to support WHMCS 9 Select2 elements seamlessly.
Client Area & UI Toolkit
-
PUQ UI Toolkit — Added standard
templates/header.tplproviding CSS design tokens, modern card layouts, toast alerts, loading spinners, and clipboard helpers. - CSRF Protection — Form and state-changing AJAX calls in the client area now include CSRF token verification.
-
Modern Dashboard UI — Clean left-aligned layout, prominent top action card (
btn btn-outline-primary), responsive 2-column detail grid, and optimized zones list table. -
Full Localization — Dual Ukrainian language file support (
ukrainian.phpandukranian.php), sanitized typographically correct apostrophes across Catalan, French, and Italian, and 100% localized modals and placeholders across 26 languages.
Settings & Provisioning
-
Allowed Record Types Restriction & Quick Presets — Product settings now feature an
Allowed record typesconfiguration with quick preset buttons (All, Web Basics, Web + Mail, Standard, Clear) and interactive clickable badges for 24+ DNS record types. Leaving it empty allows all record types by default. In the client area, record creation (Add Record dropdown) and record editing (table and modal) are dynamically filtered and backend-enforced. - Admin Zone Sync & Server Pull/Push — Added administrative controls on the service page to pull existing zones from the PowerDNS server, push local records to the server, inspect and delete records, and run interactive zone synchronization with conflict resolution.
-
Conflict Zone Isolation — Hardened zone deletion, reload, and service termination to ensure
not allowedconflict entries never modify or remove zones belonging to other active services on the PowerDNS server. -
Zero-Touch Settings Auto-Migration — Automatically upgrades legacy product settings (
configoption3/4/5/7) into the modern unified configuration slot (configoption24) in the database upon product viewing. - Automated Service Cleanup — Local zone database records are automatically cleaned up upon service termination to maintain database integrity.
-
Protective Directory Indexes — Added protective
index.phpacross all module subdirectories.
v3.0
Full rewrite onto the unified PUQ WHMCS module skeleton.
-
Architecture: license verification moved into the main module file with a block-based offline cache; product configuration consolidated into a single JSON document in
configoption24, rendered by anAdminAreaFooterOutput-injected form. Backward compatible — v2.x installs keep working by reading the legacyconfigoption3/4/5/7slots until the first save through the new form. -
Schema migrations: introduced a versioned, idempotent migration runner (
puqPowerDNSMigrations) recorded inpuq_module_versions. Addscreated_at,updated_atandserialcolumns topuqPowerDNS_zones. A fresh install and a v2 upgrade converge on the same schema. - Client area: redesigned with a modern card-based UI. Creating, editing and deleting zones and records — plus zone reload — now run over AJAX with proper ownership checks (no more session-message redirects).
- Admin area: the service product tab lists zones with AJAX reload/delete actions; an admin homepage alert flags products with an invalid or missing license.
-
Hardening: full pass for PHP 7.4 / 8.1 / 8.2+ compatibility — null-safe access to all request/DB data,
try/catcharound every external call (PowerDNS API, WHMCS API, database, cURL), consistent error logging, andhtmlspecialcharson all output. - Localization: 25 languages kept in sync against the canonical English key set.
-
Compatibility: shipped as separate ionCube builds for PHP 7.4 (
php74), 8.1 (php81) and 8.2+ (php82). Requires ionCube Loader v13+.
Installation and Configuration Guide
Step-by-step instructions for installing and configuring the PowerDNS WHMCS module: preparing the PowerDNS server and its HTTP API, installing or updating the module in WHMCS, adding the PowerDNS server, and configuring the product (zone quota, SOA defaults, name servers, blacklist and zone template).
WHMCS Installation and Update
PowerDNS module WHMCS
Order now | Download | Community
System requirements
| Requirement | Minimum |
|---|---|
| WHMCS | 8.x+, 9.x+ |
| PHP | 7.4, 8.1, 8.2, 8.3, 8.4 |
| ionCube Loader | v15+ |
| PowerDNS Authoritative | 4.x+ with HTTP API enabled |
Note: The module uses ionCube encoding. Make sure ionCube Loader v15 or newer is installed and active on your server.
Installation
Note: The module uses ionCube 15, providing universal support across PHP 7.4 through PHP 8.4.
All versions can be found at this link:
https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-PowerDNS/Older module versions for WHMCS 8 are available in the archive directory:
https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-PowerDNS/archive/
-
Download the latest release from the PUQ download repository:
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-PowerDNS/PUQ_WHMCS-PowerDNS-latest.zip -
Unpack the downloaded archive:
unzip PUQ_WHMCS-PowerDNS-latest.zip -
Upload the
puqPowerDNSfolder into themodules/servers/directory of your WHMCS installation:cp -r puqPowerDNS /path/to/whmcs/modules/servers/ -
Ensure proper ownership and permissions for your web server user (
www-data,nginx, orapache):chown -R www-data:www-data /path/to/whmcs/modules/servers/puqPowerDNS/ chmod -R 755 /path/to/whmcs/modules/servers/puqPowerDNS/ -
The module files are now in place. On first load in WHMCS, the automated migration engine will construct all required tables (
puqPowerDNS_zones,puq_license,puq_module_versions). No manual SQL execution is needed.
Update
The update procedure consists of replacing existing module files with the newly downloaded release:
- Back up your WHMCS database and
modules/servers/puqPowerDNS/directory. - Download and unzip the latest release package.
- Overwrite the files in
modules/servers/puqPowerDNS/with the new version files. - Access any page in the WHMCS Admin Area. The module migration runner will automatically apply pending schema upgrades and log the new version in
puq_module_versions. - Upgrading from legacy v2.x/v3.x releases is completely safe: existing product configurations are automatically migrated into the unified settings structure.
PowerDNS setup (HTTP API)
PowerDNS module WHMCS
Order now | Download | Community
The module communicates with your PowerDNS authoritative server via its built-in HTTP API. Before WHMCS can provision and manage DNS zones, you must enable the HTTP API and define an API key on your PowerDNS server.
1. Enable the HTTP API in PowerDNS
Open your PowerDNS main configuration file (typically /etc/powerdns/pdns.conf or a dedicated snippet file under /etc/powerdns/pdns.d/):
# Enable the built-in webserver and HTTP API
webserver=yes
webserver-address=0.0.0.0
webserver-port=8081
webserver-allow-from=0.0.0.0/0
api=yes
api-key=YOUR_SECRET_API_KEY_HERE
Configuration Parameters:
-
api-key: A cryptographically random secret string. This value will be entered into WHMCS as the Server Password. -
webserver-port: Listening port for HTTP API requests (default is8081). If using HTTPS reverse proxy (such as Nginx with SSL), use port443and enable the Secure (SSL) checkbox in WHMCS. -
webserver-allow-from: Comma-separated list or CIDR masks of allowed source IP addresses. Ensure the outbound IP address of your WHMCS server is included here.
Restart the PowerDNS service to apply the configuration:
systemctl restart pdns
2. Verify the HTTP API
From your WHMCS host (or any permitted workstation), test connectivity and authorization using curl:
curl -s -H 'X-API-Key: YOUR_SECRET_API_KEY_HERE' \
http://YOUR_PDNS_HOST:8081/api/v1/servers/localhost | jq .
A successful response will return a JSON object with server attributes, including the version string:
{
"type": "Server",
"id": "localhost",
"url": "/api/v1/servers/localhost",
"daemon_type": "authoritative",
"version": "4.8.4",
"zones_url": "/api/v1/servers/localhost/zones{/zone}"
}
This is the exact API endpoint WHMCS verifies when you click the Test Connection button.
3. Master and Zone Behavior Notes
-
Master Zone Architecture: Zones provisioned by the module are registered as Master (
type: "Master") withSOA-EDIT-API = INCREASE. This ensures that PowerDNS automatically increments the SOA serial number on every record mutation. -
SOA & NS Origin: Authoritative name servers and default SOA parameters written to each zone originate strictly from your WHMCS Product Configuration (Module Settings), rather than global values in
pdns.conf.
Add Server in WHMCS
PowerDNS module WHMCS
Order now | Download | Community
Register your PowerDNS authoritative server within WHMCS so products can provision against its HTTP API.
1. Add New Server
- In the WHMCS Admin Area, navigate to System Settings → Servers (or Setup → Products/Services → Servers).
- Click Add New Server.
- Fill in the primary server details:
-
Name: A descriptive label for the server (e.g.,
PowerDNS Cluster 1). -
Hostname: The fully qualified domain name or IP address of the PowerDNS server (e.g.,
pdns-test.puq.info). - IP Address: The IP address of the PowerDNS API endpoint (optional if hostname resolves).
-
Max No. of Accounts: Maximum accounts assigned to this server (e.g.,
200).
-
Name: A descriptive label for the server (e.g.,
admin-server-setup.png
2. Server Details and API Credentials
Scroll down to the Server Details section:
| Field | Required | Description |
|---|---|---|
| Type (Module) | Yes | Select PUQ PowerDNS from the dropdown list. |
| Username | No | Leave blank. PowerDNS HTTP API authentication does not use HTTP Basic usernames. |
| Password | Yes | Enter your PowerDNS api-key (from pdns.conf). The module transmits this via the X-API-Key HTTP header. |
| Secure | Optional | Check Tick to use SSL Mode for Connections if PowerDNS API is secured with HTTPS. |
| Access Hash | No | Leave blank. |
Port Configuration:
- When Secure (SSL) is enabled, the module connects via HTTPS on port
443by default. - When Secure (SSL) is disabled, the module connects via HTTP on port
8081by default. - You can override the port by specifying a custom port number in the server settings or hostname (e.g.
pdns.example.com:8443).
3. Verify Connection
- Click the Test Connection button.
- The module calls
GET /api/v1/servers/localhoston your PowerDNS server. - Upon success, WHMCS displays a green notification:
"Success! The test connection was successful." - Click Save Changes to commit the server configuration.
admin-server-details-test-connection.png
4. Server Groups (Optional)
If you operate multiple PowerDNS nodes or clusters:
Product Configuration
PowerDNS module WHMCS
Order now | Download | Community
Create and configure DNS hosting products using the PUQ PowerDNS provisioning module. All product-level policies, quotas, record filters, and templates are managed under the product's Module Settings tab.
1. Create Product in WHMCS
- In the WHMCS Admin Area, navigate to System Settings → Products/Services → Create a New Product.
- Select Product Type:
Other(orShared Hosting/Server/VPS). - Enter the Product Name (e.g.,
DNS Hosting Premium), assign a Product Group, and configure pricing. - Switch to the Module Settings tab.
- In Module Name, select PUQ PowerDNS.
- Under Server Group (or individual server), choose your PowerDNS server.
- Enter your License key in the designated field.
- The unified module configuration form loads automatically beneath the standard fields.
admin-product-module-settings.png
2. Restrictions Configuration
The Restrictions panel defines client boundaries, zone quotas, and permissible DNS record types:
| Setting | Type | Description |
|---|---|---|
| Max zones | Integer | Maximum number of DNS zones the client can create for this service. Enter 0 for unlimited zones. |
| Edit SOA | Dropdown | Yes allows clients to edit the SOA email and TTL from the client area. No locks the SOA record. |
| Allowed record types | Text / Badges | Comma-separated list of permitted record types (e.g., A, AAAA, CNAME, MX, TXT). If left completely empty, all supported record types (plus SOA if Edit SOA is enabled) are permitted. |
| Zone name filter | Textarea | Regular expressions (one per line) matched against prospective zone names. If a submitted domain matches any regex, creation is blocked. Example: /(^|\.)internal\.corp$/i. |
Allowed Record Types & Quick Presets:
To streamline configuration, the interface provides quick preset buttons and interactive clickable badges:
-
All (Default): Clears the restriction filter so all supported DNS record types (
A, AAAA, AFSDB, ALIAS, CAA, CERT, CDNSKEY, CDS, CNAME, DNSKEY, DNAME, DS, HINFO, HTTPS, KEY, LOC, LUA, MX, NAPTR, NS, NSEC, NSEC3, NSEC3PARAM, OPENPGPKEY, PTR, RP, RRSIG, SMIMEA, SPF, SRV, SSHFP, SVCB, TKEY, TLSA, TSIG, TXT, URI) are permitted. -
Web Basics: Quickly applies core web types (
A, AAAA, CNAME). -
Web + Mail: Standard web and email types (
A, AAAA, CNAME, MX, TXT, SPF). -
Standard: Expanded conventional hosting types (
A, AAAA, CNAME, ALIAS, MX, TXT, SPF, NS, SRV, CAA). - Clear: Clears the input field (which automatically enables all record types by default).
- Interactive Badges: Click any individual record badge to toggle it in or out of the allowed list instantly.
When restricted, the client area dynamically limits both the Add Record dropdown menu and client-side table filters, and enforces strict backend authorization before persisting records.
admin-product-restrictions.png
3. SOA Defaults
The SOA defaults panel defines the default parameters populated into the Start of Authority (SOA) record for every newly generated zone:
| Field | Default Value | Purpose |
|---|---|---|
| Zone administrator email | admin@example.com |
RNAME field of the SOA record (dots replaced automatically). |
| Update interval (refresh) | 86400 (24h) |
Frequency in seconds that secondary name servers query the master for changes. |
| Retry interval | 7200 (2h) |
Frequency in seconds secondary name servers wait before retrying after a failed refresh. |
| Expiry time | 3600000 (~41 days) |
Expiry window in seconds after which secondary servers stop answering authoritative queries if the master is unreachable. |
| Minimum lifetime | 3600 (1h) |
Negative caching TTL for NXDOMAIN responses. |
admin-product-soa-defaults.png
4. Name Servers
Specify up to four authoritative name servers (Name server 1 through Name server 4):
- Name server 1 is automatically used as the primary master (MNAME) in the SOA record.
- All declared name servers are automatically generated as authoritative
NSresource records on every zone creation. - These name servers are presented to clients on their service dashboard to register at their domain registrars.
admin-product-nameservers.png
5. Zone Template
The Zone template allows providers to automatically populate standard DNS boilerplate records whenever a client creates a new zone.
- Enter one record per line in the format:
name type ttl content - Use the
{zone}placeholder where the dynamically created zone name should be substituted. - Use
@for the zone apex.
Example Template:
@ A 3600 198.51.100.10
www CNAME 3600 {zone}
@ MX 3600 10 mail.{zone}
mail A 3600 198.51.100.25
@ TXT 3600 "v=spf1 mx a ~all"
admin-product-zone-template.png
6. Backward Compatibility & Automatic Migration
The module features a seamless auto-migration subsystem:
- Legacy products configured with module versions v2.x or v3.x (which utilized raw WHMCS
configoption3,configoption4,configoption5, andconfigoption7slots) continue to function without interruption. - Upon viewing or saving the product, the module automatically reads legacy parameters and migrates them into the unified JSON payload in
configoption24.
Client Area
How the customer manages their DNS service: the home screen with the zone list and quota, adding a DNS zone, managing records of every supported type, and working with reverse-DNS (PTR) zones for IPv4 and IPv6.
Home screen
PowerDNS module WHMCS
Order now | Download | Community
client-overview.png
1. Summary Cards
The top overview section provides real-time status metrics and configuration parameters:
-
Zones Quota Card: Displays current utilization against the service quota (e.g.,
1 / 10orUnlimited). If the allocated limit is reached, the Add DNS Zone action informs the client that the quota has been met. -
Name Servers Card: Displays the authoritative name servers (e.g.,
ns1.puq.info,ns2.puq.info) assigned by the hosting provider. Clients must configure these exact name servers at their domain registrar for DNS propagation.
2. DNS Zones Table
The main section lists all DNS zones provisioned under this service:
| Column | Description |
|---|---|
| Zone Name | The root domain name of the zone (e.g., puq.info). |
| Status | Current operational state: Active (green badge, active on server), Suspended (yellow badge, server zone purged due to billing suspension), or Not Allowed (red badge, conflict detected). |
| Actions | Action controls available for each individual zone. |
Available Zone Actions:
- Records: Opens the zone inspector to manage resource records. Displays an inline counter badge showing the number of active records.
- Delete (Trash Icon): Removes the zone completely. Opens a SweetAlert confirmation modal before purging the zone from both PowerDNS and WHMCS. All actions feature dynamic button spinners while executing.
3. Real-Time Search & Add Zone
- Search: A live search field above the table allows clients to filter zones instantly as they type.
- Add DNS Zone Button: Located in the top action bar, opens the zone creation modal (see Add DNS Zone).
Add DNS Zone
PowerDNS module WHMCS
Order now | Download | Community
Clients can add new forward or reverse DNS zones as long as their service has remaining quota.
1. How to Add a Zone
- On the service overview page, click the Add DNS Zone button.
- In the modal dialog:
-
Zone Name: Enter the domain name (e.g.,
puq.infoor113.0.203.in-addr.arpafor reverse DNS). - Zone Admin Email: If the hosting provider enables SOA editing, clients can enter a custom administrative contact email. Otherwise, this field is hidden and provider defaults are used.
-
Zone Name: Enter the domain name (e.g.,
- Click Add DNS Zone.
client-add-dns-zone.png
2. Automated Zone Provisioning Workflow
When the client clicks Add DNS Zone:
- Quota Check: WHMCS verifies that the client has not exceeded their service's maximum zone limit.
- Regex Validation: The domain name is verified for syntax compliance and checked against the provider's Zone name filter blacklist.
-
PowerDNS Creation: The module sends a
POST /api/v1/servers/localhost/zonesrequest to PowerDNS:- Zone is created as Master with
SOA-EDIT-API = INCREASE. - The SOA record is built using provider defaults and the client's email (if provided).
- NS records are automatically inserted for all configured name servers.
- Any boilerplate records defined in the provider's Zone template are generated with the
{zone}placeholder substituted.
- Zone is created as Master with
-
Local Database Synchronization: WHMCS stores the zone record in
puqPowerDNS_zoneswith statusactive. - The modal closes and the dashboard updates automatically with a success toast notification.
3. Validation and Error Handling
- Maximum zone limit reached: The service has reached its assigned zone capacity.
- DNS Zone name is NOT valid: The entered string does not match standard domain or in-addr.arpa syntax.
- DNS Zone name NOT allowed: The requested domain matches an administrative regex blacklist pattern.
- Problem adding DNS zone: If the zone already exists on the PowerDNS server under another service, the module avoids exposing raw database errors. It flags the request as not allowed and raises an automated internal To-Do task for hosting staff.
Managing DNS Records
PowerDNS module WHMCS
Order now | Download | Community
Click the Records button next to any active zone to access the DNS Records management console.
1. Zone Details & Toolbar
The zone view displays zone metadata, Start of Authority (SOA) details, and quick action buttons:
- All DNS Zones: Returns to the main service overview.
- Reload DNS Zone: Synchronizes and rebuilds zone records directly from the PowerDNS server.
- Add Record: Opens the dynamic modal to create a new DNS record.
- SOA Summary Card: Displays the primary MNAME server, administrative email (RNAME), and serial number. If permitted by the provider, an Edit SOA button allows clients to modify contact email and TTL parameters.
client-zone-details.png
2. Resource Records Table & Quick Filters
Below the zone header, the console presents the resource records in a responsive table.
Interactive Quick-Filter Pills:
Above the table, interactive badge pills allow instant filtering by record type (e.g. All, A, AAAA, CNAME, MX, TXT, etc.).
- When the hosting provider restricts allowed record types, only the permitted record type pills are displayed.
- Clicking any pill immediately filters the table view without triggering network calls or page reloads.
client-records-table.png
Filtered Records View Examples:
client-records-filter-a.png
client-records-filter-aaaa.png
3. Supported Record Types
The module supports 38 DNS record types. The modal dynamically adapts input fields and validation according to the selected type:
| Type | Description & Specific Fields |
|---|---|
| A | Host IPv4 address (e.g. 192.0.2.1). |
| AAAA | Host IPv6 address (e.g. 2001:db8::1). |
| AFSDB | AFS Data Base location record (Subtype and Target hostname). |
| ALIAS | Auto-resolved apex or subdomain alias (CNAME-flattening) to target hostname. |
| CAA | Certification Authority Authorization (Flags 0–255, Tag issue/issuewild/iodef, Value). |
| CERT | Certificate record (Certificate Type, Key Tag, Algorithm, Base64 Certificate). |
| CDNSKEY | Child DNSKEY record for automated DS updates (Flags, Protocol, Algorithm, Public Key). |
| CDS | Child DS record for automated parent zone DS updates (Key Tag, Algorithm, Digest Type, Digest). |
| CNAME | Canonical name alias pointing to target hostname. |
| DNSKEY | DNSSEC public key (Flags, Protocol 3, Algorithm, Public Key). |
| DNAME | Delegation name redirecting an entire subtree of the domain hierarchy. |
| DS | Delegation Signer record (Key Tag, Algorithm, Digest Type, Digest). |
| HINFO | Host Information record (Hardware and OS / Software strings). |
| HTTPS | HTTPS service binding and parameter endpoints (Priority, Target Name, Params key=value). |
| KEY | Security public key record (Flags, Protocol, Algorithm, Public Key). |
| LOC | Geographic location coordinates (RFC 1876 location string). |
| LUA | PowerDNS dynamic LUA record (Target Type and LUA Script). |
| MX | Mail exchange server (Priority integer and Target mail hostname). |
| NAPTR | Naming Authority Pointer (Order, Preference, Flags, Service, Regexp, Replacement). |
| NS | Authoritative Name Server target hostname (Provider NS records are protected from deletion). |
| NSEC | DNSSEC Next Secure record (Next Domain Name and Record Types bitmap). |
| NSEC3 | DNSSEC Next Secure v3 record (Hash Algorithm, Flags, Iterations, Salt, Next Hashed Owner Name, Types). |
| NSEC3PARAM | DNSSEC NSEC3 Parameters record (Hash Algorithm, Flags, Iterations, Salt). |
| OPENPGPKEY | OpenPGP public key record (Base64-encoded public key data). |
| PTR | Pointer record for reverse DNS mapping. |
| RP | Responsible Person mailbox and TXT domain pointer. |
| RRSIG | DNSSEC resource record signature (Type Covered, Algorithm, Labels, Original TTL, Expiration, Inception, Key Tag, Signer Name, Signature). |
| SMIMEA | S/MIME certificate association record (Usage, Selector, Matching Type, Certificate Association Data). |
| SOA | Start of Authority (Managed via provider defaults or Edit SOA modal). |
| SPF | Sender Policy Framework record. |
| SRV | Service record (Priority, Weight, Port, Target hostname). |
| SSHFP | SSH public host key fingerprint (Algorithm, Fingerprint Type, Hexadecimal Fingerprint). |
| SVCB | General Service Binding record (Priority, Target Name, Params key=value). |
| TKEY | Transaction Key record (RFC 3597 generic RDATA / hex payload). |
| TLSA | Transport Layer Security Authentication (Usage, Selector, Matching Type, Certificate Association Data). |
| TSIG | Transaction Signature record. |
| TXT | Text record (String content; automatically quoted and split into 255-byte chunks). |
| URI | Uniform Resource Identifier mapping (Priority, Weight, Target URI). |
4. Add DNS Record
- Click the Add Record button.
- Select the Type from the dropdown menu.
- If the hosting provider has configured Allowed record types, only those specific record types appear in the dropdown.
- If no restriction is configured, all 38 record types are available.
- Enter the record Name (use
@for root domain apex, or enter subdomains likewww,api,mail). - Select the TTL (from 60 seconds up to 1 day).
- Enter the type-specific data values.
- Click Add Record. A loading spinner indicates active processing. Upon success, the table updates immediately.
Full Record Types Dropdown:
client-add-record-all-types.png
Restricted Allowed Record Types Dropdown:
When the administrator restricts allowed record types to e.g. A, AAAA, CNAME, MX, TXT:
client-add-record-filtered-types.png
ALIAS Record Addition:
client-add-record-alias.png
5. Edit and Delete Records
Edit Record:
Click the Pencil icon on any record row. The edit modal appears pre-populated with current values:
- Record Type and Name are locked to prevent accidental DNS orphan references.
- TTL and record content values can be adjusted and saved instantly.
client-edit-record.png
Delete Record:
Click the Trash icon on any record row. A confirmation dialog prevents accidental deletion. Once confirmed, the record is removed from the PowerDNS server and table immediately.
ℹ️ Notice: Provider root NS records (at the zone apex) are protected with a lock icon and cannot be edited or deleted by clients. Subdomain NS records (e.g.
sub.example.com) can be added, modified, and deleted freely.
PTR IPv4 and IPv6
PowerDNS module WHMCS
Order now | Download | Community
Pointer (PTR) resource records provide Reverse DNS resolution — translating an IP address back into a canonical fully qualified domain name (FQDN). PTR records are critical for email deliverability (SPF/DKIM/rDNS checks) and network diagnostic logging.
1. Understanding Reverse DNS Zones
Reverse DNS lookups query specialized reverse zone domains determined by the network subnet:
-
IPv4 Reverse Zones (
in-addr.arpa): Constructed by reversing the octets of the network IP block and appending.in-addr.arpa.
Example: For subnet203.0.113.0/24, the reverse zone is113.0.203.in-addr.arpa. -
IPv6 Reverse Zones (
ip6.arpa): Constructed by reversing each individual hexadecimal nibble (4 bits) separated by dots and appending.ip6.arpa.
Example: For2001:db8::/32, the reverse zone is8.b.d.0.1.0.0.2.ip6.arpa.
2. Setting Up a Reverse Zone
- Ensure your upstream transit provider or IP registrar (RIPE, ARIN, APNIC) has delegated the corresponding reverse DNS subnet to your PowerDNS name servers.
- In the WHMCS client area, click Add DNS Zone.
- In Zone Name, enter the reverse zone domain (e.g.,
113.0.203.in-addr.arpa). - Click Add DNS Zone. The zone is created on the server as an authoritative master zone.
3. Adding PTR Records
- Open the reverse zone by clicking Records.
- Click Add Record and select Type:
PTR. - Fill in the parameters:
-
Name: The host identifier within the reverse zone:
- For IPv4 host
203.0.113.10inside zone113.0.203.in-addr.arpa, enter10. - For IPv6 host
2001:db8::1inside zone8.b.d.0.1.0.0.2.ip6.arpa, enter the reversed host nibble sequence.
- For IPv4 host
-
TTL: Choose a cache lifetime (e.g.,
3600). -
Domain Name: The fully-qualified target domain name (e.g.,
mail.example.com).
-
Name: The host identifier within the reverse zone:
- Click Add Record. The module automatically appends trailing dots as needed.
4. Verification
Test your reverse DNS propagation using dig or host:
# Test IPv4 PTR Record
dig -x 203.0.113.10 +short
# Test IPv6 PTR Record
dig -x 2001:db8::1 +short
The output should return your target FQDN.
Admin Area
What staff see and can do from the WHMCS admin side: the per-service zone list on the product page, with reload and delete actions, plus the license alert and zone-conflict handling.
Service Management (Admin)
PowerDNS module WHMCS
Order now | Download | Community
Administrators can manage DNS services directly from WHMCS Admin → Clients → [Select Client] → Products/Services (or via Clients → Services).
The module embeds an interactive Zones management section within the service details page:
admin-service-zones.png
1. Zones Management Table
The administrative panel displays all zones assigned to this service instance:
| Column | Description |
|---|---|
| Zone / Domain | The fully qualified zone name. |
| Serial | The SOA serial number of the zone as reported by PowerDNS. |
| Records | Quick counter badge showing the total number of records in the zone (clickable to open the Records inspector modal). |
| Status | active (live on server), suspended (kept in WHMCS, purged from server), or not allowed (conflict detected). |
| Actions | Direct administrative controls for individual zones. |
Top Toolbar & Zone Actions:
- Add Zone: Create a new zone directly on the service (with an option to pull existing server records if the zone already exists on PowerDNS).
- Pull from Server: Discover all zones hosted on the PowerDNS server and import an existing zone into this customer's service with all records preserved.
- Refresh: Reloads the administrative zones table via AJAX.
- Records: Opens the administrative DNS Records modal to inspect, filter by record type, search, or delete resource records directly without logging into the client area.
- Sync: Opens the Zone Synchronization modal, comparing the PowerDNS server zone with the WHMCS local database (identifying in-sync records, server-only records, local-only records, and conflicts) and allowing granular conflict resolution.
- Push to Server (☁↑): Pushes the local WHMCS database records for the zone directly to the PowerDNS server.
- Delete (🗑): Removes the zone from WHMCS, with a checkbox to also delete the zone from the PowerDNS server.
2. Administrative Modal Controls
Add DNS Zone (Admin):
Administrators can provision a new zone on behalf of the customer, bypassing quota or blacklist limits when necessary:
admin-service-add-zone.png
Manage DNS Records (Admin):
Inspect all active resource records, TTLs, and content strings in real time:
admin-service-records-modal.png
Zone Synchronization:
The Zone Synchronization modal allows administrators to scan the connected PowerDNS authoritative server and import pre-existing or orphaned zones directly into the client's service:
admin-service-sync-modal.png
3. WHMCS Module Lifecycle Commands
The module integrates seamlessly with the standard WHMCS service lifecycle buttons:
- Create: Executed upon order activation. If a domain name was supplied during checkout, it is automatically provisioned as the client's first DNS zone.
-
Suspend: Triggered upon overdue invoice or manual administrative suspension. Purges all active zones of this service from the PowerDNS authoritative server while preserving all records in the WHMCS database (marked as
suspended). - Unsuspend: Re-provisions all suspended zones and their corresponding records back onto the PowerDNS server.
- Terminate: Executed upon service cancellation or termination. Permanently deletes all associated zones and records from both the PowerDNS server and WHMCS.
License Alerts & Zone Conflicts
PowerDNS module WHMCS
Order now | Download | Community
1. Automated License Verification & Admin Alerts
The module validates licensing for each configured product against license.puqcloud.com.
- Verification transactions occur online periodically and are securely cached in the local database (
puq_license), ensuring that temporary connectivity interruptions to the license server never disrupt customer DNS operations. - If a product is configured with an invalid or expired license key, an alert notification is prominently displayed on the WHMCS Admin Dashboard. The alert lists each affected product and provides a direct shortcut link to its configuration page.
Note: When a product's license is invalid or missing, automated module lifecycle commands (Create, Suspend, Unsuspend, Terminate) are halted, and a license validation warning is returned to prevent provisioning errors.
2. DNS Zone Conflicts Handling
A DNS zone must be strictly unique across an authoritative PowerDNS server. If a client attempts to create a zone that already exists on the server or is assigned to another WHMCS service:
- Client Experience: The client does not encounter an unhandled PHP or API exception. Instead, a clean, user-friendly notification informs them that the zone cannot be added.
-
Database Logging: The attempted zone is logged in
puqPowerDNS_zoneswith statusnot allowed. -
Automated Staff Task: The module automatically registers a high-priority To-Do item in WHMCS Admin → Utilities → To-Do List titled
DNS zone conflict. The task includes:- Client ID and Service ID
- Conflicting Zone Name
- Reason for conflict (already exists on PowerDNS server or across another service)
- Staff can review the conflict, coordinate with the domain owner or remove stale orphan zones, and resolve the task.
3. Module Logging & Diagnostics
All outbound API calls to PowerDNS and licensing endpoints are recorded in WHMCS Admin → Utilities → Logs → Module Log under the identifier puqPowerDNS:
- To keep logs clean and readable, routine offline database license checks are suppressed from the module log.
- Full HTTP request endpoints, request payloads, response bodies, and HTTP status codes are recorded for API interactions, providing complete diagnostic visibility.