Configure a domain name and DNS
Link a domain name to your container and understand essential DNS records.
What this tutorial does
The tutorial "Configure a domain name and DNS" helps you achieve this goal:
Link a domain name to your container and understand essential DNS records.
General (at your registrar)
- --- Primary DNS records to create ---
-
A record (domain -> IP): - example.com. A 1.2.3.4
- www.example.com. A 1.2.3.4
- AAAA registration (IPv6, if available):
- example.com. AAAA 2001:db8::1
- MX record (incoming email):
- example.com. MX 10 mail.example.com.
- CNAME record (alias to another domain):
- blog.example.com. CNAME example.com.
- TXT recording (anti-spam SPF):
- example.com. TXT "v=spf1 ip4:1.2.3.4 ~all"
- --- Check DNS Propagation ---
- From the container: dig example.com A
- Check online: https://dnschecker.org
- DNS propagation can take from a few minutes to 48 hours.
- --- Test local resolution ---
-
apt install -y dnsutils - nslookup example.com