Overview
This article provides instructions for verifying local DNS caching status and configuring BIND as the local resolver on a Plesk server. Enabling local DNS caching improves query resolution performance and ensures compatibility with services that require recursive DNS functionality.
Prerequisites
- Root or sudo access to the server
- Plesk Obsidian or Plesk Onyx installed
- Network connectivity for package installation and DNS queries
Verify Current DNS Caching Status
Execute the following command to determine whether local DNS caching is currently enabled:
host -tTXT 2.0.0.127.multi.uribl.com
If local DNS caching is disabled, the output will resemble the following:
2.0.0.127.multi.uribl.com descriptive text "127.0.0.1 -> Query Refused. See http://uribl.com/refused.shtml for more information [Your DNS IP: 203.0.113.1]"
Install and Configure BIND as Local Resolver
- Install the BIND component: If BIND is not already installed, run the following command via Plesk Installer:
plesk installer add --components bind - Validate configuration syntax: Ensure there are no errors in the BIND configuration files by running:
If the command returns no output, the configuration is syntactically correct. Address any reported errors before proceeding.named-checkconf - Restart the DNS service: Apply the changes by restarting the appropriate service for your operating system:
- AlmaLinux/CloudLinux/RHEL:
systemctl restart named-chroot - Debian/Ubuntu:
systemctl restart bind9
- AlmaLinux/CloudLinux/RHEL:
- Configure the local resolver: Edit the /etc/resolv.conf file and add 127.0.0.1 as the primary nameserver:
nameserver 127.0.0.1
Verify Configuration
Allow a few minutes for the DNS cache to initialize, then execute the verification command again:
host -tTXT 2.0.0.127.multi.uribl.com
If local DNS caching is successfully enabled, the output will display:
2.0.0.127.multi.uribl.com descriptive text "permanent testpoint"
Troubleshooting & Common Issues
- /etc/resolv.conf overwritten on reboot (RHEL-based systems): If the server uses NetworkManager and DNS entries are defined in /etc/sysconfig/network-scripts/ifcfg-*, the /etc/resolv.conf file will be regenerated upon reboot. To prevent this, either remove the DNS directives from the interface configuration files or use the nmcli utility to configure DNS settings persistently.
- Configuration syntax errors: If named-checkconf returns errors, review the BIND configuration files and correct any malformed directives before restarting the service.
- Delayed cache propagation: DNS caching may require several minutes to populate. If the verification command still returns a refusal message, wait briefly and retry.