Get Rewarded! We will reward you with up to €50 credit on your account for every tutorial that you write and we publish!

Connect Plesk with Hetzner DNS

profile picture
Author
Christian Hillenkötter
Published
2020-09-24
Time to read
6 minutes reading time

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:

Records with domain registrar
Delegated zone
NS
@
<hetzner-1>
NS
@
<hetzner-2>
NS
@
<hetzner-3>
Records with Plesk
Primary zone
NS
@
<hetzner-1>
NS
@
<hetzner-2>
NS
@
<hetzner-3>

A
@
203.0.113.1
A
blog
172.16.3.9

All records (e.g. A, MX, etc.) are stored on the Plesk server.
Records with Hetzner
Secondary zone
NS
@
<hetzner-1>
NS
@
<hetzner-2>
NS
@
<hetzner-3>

All other records (e.g. A, MX, etc.) are transferred via AXFR from the Plesk server (primary zone) to this secondary zone.

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".

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

Add IPs

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

Add nameservers

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.

Advanced DNS features

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 Secondary and click on "Continue".

Add Zone

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.

Successfully added the domain

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 NS

In 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:

License: MIT
Want to contribute?

Get Rewarded: Get up to €50 in credit! Be a part of the community and contribute. Do it for the money. Do it for the bragging rights. And do it to teach others!

Report Issue
Try Hetzner Cloud

Get €20/$20 free credit!

Valid until: 31 December 2025 Valid for: 3 months and only for new customers
Get started
Want to contribute?

Get Rewarded: Get up to €50 credit on your account for every tutorial you write and we publish!

Find out more