When you type a website address into your browser, a system called DNS finds out where that website lives. DNS records are the entries that hold this information for your domain. They decide where your website is served from, where your email goes, and how other services check that your domain belongs to you. This guide explains the most common DNS record types in simple words.
DNS stands for Domain Name System. Computers find each other using numbers called IP addresses, but people remember names such as example.com. DNS connects the two. It works like a phone book that turns a domain name into the details a computer needs.
The information for your domain is stored on a DNS server as a set of records. You usually manage them in the control panel of your domain registrar or hosting company.
Most records have the same basic parts:
@, and a subdomain such as blog refers to blog.example.com.An A record connects a domain name to an IPv4 address. This is the record that tells browsers which server hosts your website.
Name: @ Type: A Value: 192.0.2.10
If your site moves to a new server, you usually change the A record to the new address. The address above is an example reserved for documentation and is not a real server.
An AAAA record does the same job as an A record, but for an IPv6 address, which is the newer and longer type of address. If your host gives you both kinds of address, you can add both records.
A CNAME record makes one name an alias of another name instead of pointing to an IP address.
Name: www Type: CNAME Value: example.com
Here, www.example.com follows wherever example.com points. If the main address changes, the alias follows it automatically.
MX stands for Mail Exchange. These records tell the internet which servers receive email for your domain.
Name: @ Type: MX Priority: 10 Value: mail.example.com
The priority number decides the order. A lower number means higher priority, so mail is tried first at the server with the lowest number. If that server is not available, the next one is tried. The value of an MX record is a hostname, not an IP address.
If you use an email service such as a hosted mailbox, your provider will give you the MX records to add.
A TXT record holds plain text. It does not send visitors or email anywhere. Instead, other services read it to learn something about your domain. Common uses are:
Correct email records help your messages reach the inbox instead of the spam folder.
TTL, or Time To Live, tells other servers how long they may keep a record before they ask again. A short TTL, such as 300 seconds, means changes spread faster, and a longer one reduces the number of lookups. If you plan to move a website, many owners lower the TTL a day or so earlier so that the change takes effect quickly.
When you change a record, other servers around the world may still have the old answer saved until its TTL ends. This is often called DNS propagation. Some changes seem to work within minutes, while others can take several hours or longer, so be patient and avoid changing the same record again and again.
On Windows, Mac, and Linux, you can also use the command line. For example, nslookup example.com shows the address for a domain.
An A record points a name to an IP address. A CNAME points a name to another name.
Yes. Many domains have several, each with a priority, so that mail still arrives if one server is down.
Yes. A domain often has several, for verification codes and email security. There should be only one SPF record, though.
It depends on the TTL and on the servers involved. It can be minutes, or several hours in some cases.
Wherever your domain's name servers are managed. This is often your registrar, your hosting company, or a separate DNS service.