DNS
planejadoPlanejado para o WardPane 2.4. Este recurso não está na versão atual; a página descreve como ele deve funcionar. Roteiro
A site opens and gets a certificate only after DNS points its domain to your server. You can keep DNS where it is today (at your registrar, at Cloudflare or at another DNS provider) and add the records below, or, from 2.4, let WardPane host the zones on the server itself.
What a site needs
Every name of a site, the main domain and each alias, needs these records.
| Record | Points to | Needed |
|---|---|---|
A |
The IPv4 address of the server | Yes |
AAAA |
The IPv6 address of the server | Only if the server has IPv6 and you want visitors to use it |
Example for example.com with www.example.com as an alias, on a server with the address 203.0.113.10:
example.com. A 203.0.113.10
www.example.com. A 203.0.113.10
A CNAME from www.example.com to example.com works too.
AAAA records matter for certificates. If a name has AAAA records, every one of them must point to this server: Let’s Encrypt tries IPv6 first, and a stale AAAA record left over from an old host makes validation fail. If the server has no IPv6, remove the AAAA records. See SSL certificates.
DNS changes take time to spread, from a few minutes to the TTL of the old record. The panel checks DNS before it orders a certificate and adds each name to it once the name points to the server. Check DNS on a site’s SSL tab shows where each name points right now.
A site behind Cloudflare (orange cloud) has records that point to Cloudflare instead. That is expected; see Cloudflare.
DNS management in WardPane
WardPane 2.4 will add a DNS management section for running the DNS of your domains yourself. It will support three ways of working, and you can combine them.
With your own name servers, the server hosts the DNS zones of your domains and answers DNS queries for them. You edit the records in the panel, next to the sites that use them.
Secondary (slave) name servers keep a copy of your zones and answer queries as well. With at least one of them on another machine, your domains keep resolving while the main server is down.
If your zones live in Cloudflare, the panel can instead create or fix the records for your sites through the Cloudflare API. Connecting an account is described on the Cloudflare page.
The dashboard health checks warn when the DNS of a site does not point to the server (for example “DNS of example.com does not point here”) and either offer a fix or explain how to make it.
Using your own name servers
For resolvers everywhere to ask your server about example.com, the domain’s registrar has to list your name servers. The usual setup uses two names under one of your domains, for example ns1.example.com and ns2.example.com, on two different servers (the second one can be a secondary server).
The steps are:
- Create the zone in DNS management and make sure it has the records you need (A or AAAA for the sites, MX and TXT records for mail, and NS records for your name servers).
- Register glue records at the registrar. When the name servers are inside the domain they serve (
ns1.example.comforexample.com), resolvers need their IP addresses before they can ask them anything; these addresses are the glue records. At your registrar, look for a section called “child name servers”, “host records”, “glue records” or “register name servers”, and enter each name server with its IP address. - Change the domain’s name servers at the registrar to
ns1.example.comandns2.example.com. - Wait for the change to spread. The registry usually updates within minutes to hours, but resolvers may keep the old name servers until their TTL runs out, which can take a day or two.
Name servers under a different domain (for example ns1.myhosting.net serving example.com) need glue only once, for their own domain.
Check the result from any computer:
dig NS example.com +short # which name servers the world sees
dig A example.com @ns1.example.com # ask your server directly
Name servers are reachable only with port 53 (TCP and UDP) open in the VPS provider’s firewall.
Mail records
A domain that receives mail needs MX, SPF, DKIM and DMARC records, and the server needs a PTR record. The Mail page has examples.