DNS-poster Förklarade: A, AAAA, MX, TXT, CNAME, NS
Quick Answer
DNS-poster talar om för internet hur din domän ska hanteras. A-poster pekar till IPv4-adresser, AAAA till IPv6, MX dirigerar email, TXT lagrar text-metadata, CNAME aliasar en domän och NS delegerar till nameservers. Använd vår gratis DNS Lookup för att fråga valfri posttyp.
Introduction
DNS-poster (Domain Name System) är poster i en DNS-databas som mappar domännamn till IP-adresser och annan routing-information. Varje posttyp tjänar ett specifikt syfte, från att peka en domän till en server till att konfigurera email-routing. Att förstå DNS-poster är essentiellt för webbutvecklare och systemadministratörer.
Step by Step
-
A Record (IPv4 Address)
The A record maps a domain name to an IPv4 address (e.g., 93.184.216.34). This is the most common DNS record type, used to point your domain to your web server.
-
AAAA Record (IPv6 Address)
The AAAA record maps a domain name to an IPv6 address (e.g., 2606:2800:220:1:248:1893:25c8:194). As IPv6 adoption grows, AAAA records are increasingly important.
-
MX Record (Mail Exchange)
MX records specify the mail servers that handle email for your domain, with a priority value (lower = higher priority). Example: example.com MX 10 mail.example.com.
-
TXT Record (Text)
TXT records store arbitrary text data, commonly used for SPF, DKIM, DMARC email authentication, domain verification, and other metadata.
-
CNAME Record (Canonical Name)
CNAME records alias one domain name to another. Commonly used to point www.example.com to example.com, or to point a domain to a hosted service like GitHub Pages.
-
NS Record (Nameserver)
NS records specify the authoritative nameservers for a domain. These are the servers that hold the actual DNS records for your domain.
Examples
A record for example.com
Input: dig example.com A
Output: 93.184.216.34
MX record for gmail.com
Input: dig gmail.com MX
Output: 5 gmail-smtp-in.l.google.com. (priority 5)
TXT record for SPF
Input: dig example.com TXT
Output: "v=spf1 include:_spf.google.com ~all"
CNAME for www
Input: dig www.example.com CNAME
Output: example.com.
Common Problems
- DNS propagation can take 24-48 hours —changes are not immediate due to caching at multiple levels.
- CNAME records cannot coexist with other record types for the same name —use A records instead if you need other records.
- MX records require a priority value —omitting it can cause email delivery issues.
- TXT records have a maximum length of 255 characters per string —longer values must be split into multiple strings.
Tips
- Use our DNS Lookup tool to verify your DNS records are correctly configured.
- Set a low TTL (300 seconds) when making changes, then increase it after propagation.
- Always include both A and AAAA records if your server supports IPv6.
- Use SPF, DKIM, and DMARC TXT records to improve email deliverability and prevent spoofing.