Introduction
This tutorial describes how to connect the DNS in Hetzner Console to a Plesk Server using Bind and AXFR for zone transfer. This means, your Plesk server will act as a "hidden primary" zone. Hetzner DNS will act as a secondary DNS zone. For more information, see this article.
By the end of this tutorial, your DNS setup should look like this:
If the Plesk installation was done via Hetzner's Robot administration interface, it is very likely, that this configuration has already been applied.
Step 1 - Make changes in Plesk
First, you have to allow the zone transfer to the Hetzner DNS servers and adjust your DNS template on the Plesk server.
To do so, log into your Plesk server and go to "Tools & Settings" » "General Settings" » "DNS Settings".
There, you need to click on the tab "Transfer Restrictions Template". It controls which IPs can request a zone transfer (AXFR). Add the following IPv4s. If you like to use IPv6 for zone transfer, you should also add the following IP6s. Those are the IPs of Hetzner's secondary name servers.
| Name server | IPv4 address | IPv6 address |
|---|---|---|
| ns1.first-ns.de. | 213.239.242.238 | 2a01:4f8:0:a101:🅰️1 |
| robotns2.second-ns.de. | 213.133.100.103 | 2a01:4f8:0:1::5ddc:2 |
| robotns3.second-ns.com. | 193.47.99.3 | 2001:67c:192c::add:a3 |
After doing so, stay in "Tools & Settings" » "General Settings" » "DNS Settings" but switch back to the tab "Zone Records Template".
Here, you have to click on "Add Record".
As Record Type, you have to select "NS" and as nameserver, you have to enter Hetzner's 3 secondary name servers:
- ns1.first-ns.de
- robotns2.second-ns.de
- robotns3.second-ns.com
When returning to the main overview, make sure that you delete the 2 default NS Records. After doing so, click on "Apply the changes to all hosted domains".
Next, stay in "Tools & Settings" » "General Settings" » "DNS Settings" again but switch to the tab "Zone Settings Template".
Make sure "Use the serial number format recommended by IETF and RIPE" is checked so that DNS replication works.
Step 2 - Add the domain to Hetzner
Sign into the Hetzner Console.
Select your project and click on "DNS" in the left menu bar.
- Click "Add DNS zone"
- Enter your domain
- Select
Secondaryand click on "Continue".
On the next page, enter the IP address of your Plesk Server. Confirm with "Add". When the IP is listed in "PRIMARY NAMESERVERS", click on "Add DNS zone". After this, you should be able to see that the domain was added successfully.
Step 3 - Update your Domain
If your domain is already registered and you are using it on different nameservers, you need to update your domain at your registrar.
I highly recommend you first check that the Hetzner nameservers are answering correctly. You can check this by querying them:
dig @ns1.first-ns.de example.com -t NS
dig @robotns2.second-ns.de example.com -t NS
dig @robotns3.second-ns.com example.com -t NSIn all 3 cases, you should see the NS records with the nameservers of Hetzner.
;; ANSWER SECTION:
example.com. 86400 IN NS ns1.first-ns.de.
example.com. 86400 IN NS robotns2.second-ns.de.
example.com. 86400 IN NS robotns3.second-ns.com.After you are certain all data is correct, you can update your domain at your registrar and point them to Hetzner's 3 secondary name servers ns1.first-ns.de, robotns2.second-ns.de and robotns3.second-ns.com.
Conclusion
You've now connected DNS in Hetzner Console to a Plesk Server.
Additional links to Hetzner's official documentation:
- Hetzner autoritative Nameserver » Secondary DNS servers
- Plesk » Using the Hetzner name servers
- Secondary DNS (general documentation)