Docs apolopanel.com ↗ Start trial ↗
Documentation Hosting

DNS

APOLO can be the DNS server of the domains it hosts: BIND answers for their zones, and APOLO keeps the records of websites and mail up to date by itself. Or you keep DNS at the registrar or another provider and copy the records the panel shows. This page covers both, the record editor, nameservers, the mail records and the DNS servers the server itself asks.

APOLO as the nameserver, or DNS elsewhere

A domain's DNS is wherever its registrar's nameservers point. There are two ways to run it with APOLO:

DNS elsewhere the default
The DNS server stays off and the domain keeps its registrar's DNS (or Cloudflare, or any provider). Point the domain and its www at the server with A records (and AAAA for IPv6) and add the mail records from Email → DNS records (see Email: DNS records for mail). The panel never changes records there: you keep them up to date yourself (when the server's address changes, for example).
APOLO as the nameserver
An administrator turns on the DNS server and sets the nameservers, and the domain's registrar is set to those nameservers. APOLO then makes a zone for every website and keeps its records up to date: the website's address, mail (MX, SPF, DKIM, DMARC) and the nameservers. The owners edit their zones in the panel.

Most domains keep their registrar's DNS, which is why the DNS server is off until an administrator turns it on.

APOLO's BIND has no secondary server: it doesn't transfer zones to other servers. Your nameservers (ns1, ns2) normally both point at this one server, so when it is down its domains don't resolve either. For DNS that keeps answering while the server is down, use a DNS provider with several servers.

Turn on the DNS server

Administrators only, on the DNS page (in the menu under System).

The DNS page of an administrator: the DNS server card, the nameservers with their addresses, and the zones
The DNS page: the DNS server, the nameservers and the zones.
  1. Open DNS and choose Turn on DNS.
  2. Check the nameservers. The panel suggests ns1 and ns2 under the server's host name's domain (for server.example.com: ns1.example.com and ns2.example.com), with the server's IPv4 address. See Nameservers.
  3. Choose Turn on DNS. It runs in the background ("Turning on DNS", then "DNS is on").
  4. Set the nameservers at the registrar of each domain that should use this server (below).

Turning DNS on installs BIND if it is missing (the packages bind and bind-utils on AlmaLinux, Rocky Linux and RHEL, bind9 and bind9-utils on Debian and Ubuntu), writes its configuration, opens port 53 (TCP and UDP) in the firewall, and writes and loads the zones of every website. When BIND's configuration already has zones APOLO didn't make, turning on is refused until you move them out; the DNS server card lists them ("BIND has zones APOLO didn't make: …").

The DNS server card shows the state (Not installed, Off, Turning on…, Running, Not running), the BIND version, the number of zones, the service, the configuration file and the server's IPv4 and IPv6 addresses. Turn off stops BIND and closes port 53; the zones stay and come back when you turn it on again. In Services, BIND has the row BIND (DNS).

In the setup wizard

The setup wizard of the first sign-in (see First steps) has a section DNS server with Turn on the DNS service, off by default. Turned on, it does the same as the DNS page, after the wizard's other steps. When no nameservers are set yet, a server whose host name is a full domain name (such as server.example.com) uses that name as the zones' only nameserver; otherwise DNS stays off and the wizard notes "Set the nameservers on the DNS page, then turn DNS on there." When DNS is on already, the wizard says "DNS is already on."

Nameservers

The Nameservers card on the DNS page sets the NS records of every zone, with their addresses:

Nameserver, IPv4, IPv6
One row per nameserver (up to 6; Add nameserver), each with its host name, its IPv4 address (the server's own when left empty) and, optionally, its IPv6 address.
SOA e-mail optional
The contact address in each zone's SOA record. Empty: hostmaster@<zone>.
Default TTL 3600 seconds
How long other servers may cache a record, from 60 to 86400 seconds. It applies to every record of every zone that has no TTL of its own.
Make a zone for every new website on
A new website (and its aliases, and a domain without a website) gets its zone by itself (see Zones). Off: only the zones you add.

Every zone gets an NS record for each nameserver; these records are locked in the zone (a lock icon) and change only here. When a nameserver's name is inside a zone (ns1.example.com in example.com), that zone also gets its A record, and AAAA with an IPv6 address: the glue. Without any nameserver set, the zones use the server's host name, when it is a full domain name. The first nameserver is the primary one in each zone's SOA record. Hosting users see the nameservers to set at the registrar on their own DNS page.

At the registrar

  1. For the domain the nameservers are named after (example.com for ns1.example.com): register the nameservers with their IP addresses at its registrar. Registrars call this glue records, child nameservers or host records.
  2. For each domain that should use this server: set its nameservers to the same names (ns1.example.com, ns2.example.com). Most registrars want at least two.
  3. On the zone's page, Check again under Delegation shows when the change is visible; it can take from minutes to a day or two.

Zones

A zone holds the records of one domain. With Make a zone for every new website on, every website gets one when DNS is on:

  • A website whose name is under a zone that exists here becomes records in that zone: blog.example.com goes into example.com.
  • Otherwise www. is dropped and the rest becomes a new zone: www.example.com makes example.com. A website blog.example.com whose parent domain isn't here gets a zone of its own; the parent's DNS then has to delegate blog to your nameservers with NS records.
  • The website's aliases and the domains without a website (Websites → Domains, see Domains) get their zones the same way.

A zone belongs to the owner of its website and moves with the website to another account. It goes when its website goes. A website's zone that an administrator deleted isn't made again by itself (adding it with Add zone brings it back); zones an administrator adds stay until they are deleted. APOLO goes through the zones every 10 minutes and right after a website or mail change.

The Zones list shows each zone with its owner (administrators), its number of records, its state and when it changed; with more than six zones it has a search. The states:

Active
The DNS server has the current records.
Pending
The change waits to be loaded.
Error
BIND didn't take the last change: the previous version keeps answering, and hovering shows why.
Off
DNS is turned off on the server.

Administrators can also:

  • Add zone: the domain and its Owner (the owner sees and edits the zone). A zone named after a website's domain belongs to that website, and the records of names under it (subdomain websites) move into it.
  • Delete zone in the zone's menu (type the name to confirm): the domain stops resolving here, and APOLO doesn't make the zone again for its website.

Hosting users find DNS in the menu under Account, with the DNS zones feature (on in every package unless an administrator turns it off, see Packages). They see and edit only the zones of their own domains, can reset them, but can't add or delete zones; while their account or the zone's website is suspended, changes are refused. When DNS is off on the server their page says so: their domains use the DNS of their registrar.

Records

A zone's page shows its owner, the number of records, the SOA serial and when it changed, then the delegation check and the records, with a filter by type. A TTL of "default" means the zone's default.

A DNS zone in APOLO: the delegation check and the list of records, those kept by APOLO marked with a badge
A zone: the delegation check, and the records with the APOLO badge on those APOLO keeps up to date.

Records APOLO keeps up to date

Records with the APOLO badge are made and updated by the panel: after a website or mail change, and every 10 minutes (for example when the server's address changes).

ForRecords
NameserversNS at @ for each nameserver; A and AAAA (glue) for the nameservers inside the zone.
WebsitesA, and AAAA when the server has a public IPv6 address, for the website's domain and each of its aliases, www included. A website of an account with a dedicated IP address gets that address. Domains that redirect get them too.
Mail, while email is on for the domainMX, A and AAAA for mail.<domain>, SPF, DKIM, DMARC, webmail.<domain>, and the mail app setup records (see Mail records).
The serverA for the server's host name when it is a name inside the zone.
  • Editing an APOLO record makes it your own: APOLO stops updating it.
  • Deleting an APOLO record keeps it away: APOLO doesn't make it again; resetting the zone brings it back.
  • A record of your own of the same kind takes the place of APOLO's for that name: your own SPF, DMARC or DKIM TXT record, an A, AAAA, MX or NS record of the same type at the same name, or any CNAME at the name (a www CNAME, for example). Your own record at autoconfig or autodiscover (pointing to another mail provider, for example) keeps APOLO's mail app record for that name out.
  • The NS records at @ are locked: they come from the nameservers.
  • Reset to default records in the zone's menu deletes your own records and brings APOLO's back.

Add, change and delete records

  1. On the zone's page choose Add record, or the pencil of a record to change it.
  2. Choose the Type and type the Name: empty or @ for the zone itself, a name such as www or _dmarc for one under it. A full name ending in the zone is accepted too.
  3. Fill in the value and, for MX, SRV and CAA, their numbers (table below).
  4. TTL: empty for the zone's default, or 60 to 604800 seconds (7 days).
  5. Choose Add record or Save record. The trash icon deletes a record after you confirm.

Names use letters, digits, hyphens and underscores; * is allowed as the first label only (a wildcard). Host names in values can be relative (mail means mail.<zone>), full (mail.example.net) or @ for the zone itself. The same record can't be added twice, and a zone holds up to 500 records.

Every change raises the zone's serial (the date and a counter, YYYYMMDDnn), and the new zone is checked with BIND's named-checkzone before it replaces the old one. A zone BIND doesn't accept isn't loaded: the previous version keeps answering and the zone's page shows "The DNS server didn't take the last change" with BIND's message. Every change, and every refusal, goes into the audit log. Other servers see a change once the old record's TTL has run out in their caches; a name looked up before it existed is cached as missing for up to 5 minutes.

Record types

TypeValueRules
AAn IPv4 address, such as 203.0.113.5
AAAAAn IPv6 address, such as 2001:db8::1
CNAMEThe target host nameNot at @ (use an A record there). A name with a CNAME can't have any other record.
MXThe mail server, and its Priority (0 to 65535; lower is tried first)
TXTText on one line, up to 4000 characters, without quotesLonger than 255 characters (a DKIM key) is split into 255-character strings by itself.
NSA nameserverFor a name inside the zone only (to hand a subdomain to other nameservers). The zone's own nameservers come from the DNS settings.
SRVThe target, with Priority, Weight and PortThe name looks like _sip._tcp. A target of . means the service isn't offered.
CAAThe certificate authority, such as letsencrypt.org, with Flags (0, or 128 for critical) and Tag (issue, issuewild or iodef)With iodef the value is an address for reports, such as mailto:security@example.com. If you add CAA records, keep one that allows Let's Encrypt, or the websites' certificates can't be renewed.

The delegation check

Delegation on a zone's page tells what the domain's registrar says in public DNS; Check again asks again.

  • The domain uses this server's nameservers. Everything is in place.
  • The domain uses only some of this server's nameservers, or The domain uses other nameservers, with the names found: the box below lists the nameservers to set at the registrar.
  • No nameservers found (not registered yet?): the domain has no NS records, or the lookup failed.
  • This server doesn't answer for the zone yet. BIND doesn't serve the zone: DNS is off, the zone isn't loaded yet, or it is in the Error state.

The check asks the server's own DNS servers (below). When those are this server's BIND (127.0.0.1), BIND answers from its own zone and the check can't see what the registrar has. Ask a public resolver yourself: dig +short NS example.com @1.1.1.1.

Mail records

When email is on for a domain whose zone is on this server, APOLO adds the mail records to the zone itself and keeps them up to date. With DNS elsewhere, copy the same records from Email → DNS records to your DNS provider.

NameTypeValue
@MX10 mail.<domain>
mailA (and AAAA)the server's address
@TXT (SPF)v=spf1 mx a ip4:<IPv4> ip6:<IPv6> ~all
apolo._domainkeyTXT (DKIM)v=DKIM1; k=rsa; p=…
_dmarcTXT (DMARC)v=DMARC1; p=none
webmailA (and AAAA)the server's address
autoconfig, autodiscoverA (and AAAA)the server's address
_imaps._tcp, _pop3s._tcp, _submissions._tcp, _submission._tcpSRVthe mail host, ports 993, 995, 465 and 587
_autodiscover._tcpSRVautodiscover.<domain>, port 443
  • The webmail and mail app records are left out for names a website uses. The mail app records are left out while the domain's mail is on another server (see Mail routing).
  • DKIM's record appears once OpenDKIM has made the key. Turning email off takes the mail records out of the zone; the key stays on the server, so the same DKIM record comes back when email is on again. What each record does is on the Email page, under Deliverability.
  • To tighten DMARC (to p=quarantine, with rua=mailto: for reports), edit the _dmarc record: it becomes yours and APOLO leaves it alone.
  • When other services also send as the domain, edit the SPF record and add them to it; a domain must have only one SPF record.

Mail with another provider (Google Workspace, Microsoft 365) while the zone is here: either leave email off for the domain in APOLO, so the zone has no mail records, or add the provider's MX records in the zone. Your MX records at @ take the place of APOLO's, and with Automatic (by MX) routing APOLO sends the domain's mail to the provider, also mail from this server's websites. Add the provider to the SPF record too.

The server's DNS servers

These are a different thing from the DNS server above: the resolvers this server asks to find other servers by name, for updates, mail and certificates. Administrators set them in Network → Connection → DNS servers → Change (see Network):

  • 1 to 3 IP addresses, or one of the buttons Cloudflare, Google and Quad9.
  • Each new server is tested first with a query (example.com over UDP port 53, within 5 seconds); one that doesn't answer isn't set: "The DNS server … doesn't answer from this server, so it wasn't set."
  • 127.0.0.1 or ::1 (this server) only while APOLO's DNS server runs. BIND then also answers this server's own lookups of other domains, and only those.
  • They are written where the system keeps them: in the NetworkManager connection (ignoring the ones DHCP gives), in a systemd-resolved drop-in (/etc/systemd/resolved.conf.d/90-apolo-dns.conf), or in the nameserver lines of /etc/resolv.conf. The panel warns when netplan, DHCP or cloud-init may bring other ones back, and refuses to edit a /etc/resolv.conf that is a link to another file.

The DNS blocklist check of the mail server needs a local recursive resolver (see Email: Mail protection).

How BIND is set up

BIND is authoritative only: it answers everyone for the zones on this server and nobody for anything else.

  • No recursion, except for the server's own lookups when its resolvers point at it.
  • No zone transfers and no notifications to other servers; its version isn't told; answers are kept short; response rate limiting (at most 20 similar answers a second to one network) keeps it from being used against others.
  • Every zone file is checked with named-checkzone before it replaces the old one, and loaded with rndc (or a reload of the service when rndc doesn't work).
  • SOA timers: refresh 3600 s, retry 900 s, expire 14 days, negative answers 300 s.
AlmaLinux, Rocky Linux, RHELDebian, Ubuntu
Written by APOLO/etc/named.conf (the original is kept as named.conf.before-apolo)/etc/bind/named.conf.options; named.conf.local gets one include line
List of zones/etc/named/apolo-zones.conf/etc/bind/apolo-zones.conf
Zone files/var/named/apolo//var/lib/bind/apolo/

The panel writes these files: change records in the panel, not in the files. To look from the server:

# the configuration and the service
named-checkconf; systemctl status named --no-pager
# a zone as this server answers it
dig @127.0.0.1 example.com SOA +short
dig @127.0.0.1 example.com MX +short
# no answer for other domains: BIND doesn't recurse for others
dig @127.0.0.1 google.com A

If a domain doesn't resolve

The registrar still has other nameservers
Look at Delegation, or ask a public resolver: dig +short NS example.com @1.1.1.1. A change at the registry can take up to a day or two.
The nameservers are inside the domain
Register their IP addresses (glue) at the registrar: At the registrar.
Nobody gets an answer
Port 53 (TCP and UDP) must be open in the provider's firewall too. On the Network page, port 53 must stay public: restricting it stops the domains resolving for everyone.
The zone shows Error
BIND refused the last change and the previous version answers; the zone's page shows BIND's message. Correct or delete the record that caused it.
A record you deleted or changed came back, or one doesn't come back
APOLO keeps only its own records up to date: a record you changed is yours, and a deleted APOLO record stays away until you reset the zone (Records APOLO keeps up to date).
Old answers
Resolvers keep a record until its TTL runs out. Lower the TTL a day before a planned move.

More help: Troubleshooting.

Something missing or unclear? Ask support or report a bug.