DNS records are used to translate addresses humans can understand (like
google.com) into IP addresses computers can understand (like
188.8.131.52). In order for your site to work properly, you’ll need to make sure your DNS configuration is in order.
What Do All These Records Mean?
There are quite a few types of DNS records, and it can get a little confusing. However, you’ll really only be using a handful of them, so we can break them down quite easily.
Each DNS record, no matter the type, will have a few basic values. The first, and most important, is the Host, or Hostname. This is usually used to add subdomains; for example, if you wanted to point
blog.example.com to a different address than your main site, you would create a new record with “
blog” as the hostname.
Host also allows for two special values. The first is the
@ record, also known as the “primary naked domain record.” You can think of this like being blank—it will take effect for
example.com, without any subdomains, including
www. Many people will choose to redirect this domain to
www, though usually at the web server level. You can also set wildcards using an asterisk (
*). These will match any subdomain.
DNS records also have Values, which store the actual data for the record. Usually, this is just used to point the DNS record to a specific IP address or another domain name.
DNS records also have a Time-To-Live (TTL) value, which controls how long they can be cached for. If a user visits your site, their browser will cache the DNS response for a short while to make subsequent visits quicker. However, if you set your TTL too high, you can impede your ability to make quick updates, because users will have stale records still in their cache. You should aim for somewhere between one to five minutes TTL for most records.
The most important type of record is the “A Record,” also known as the host address. This record points to an IP address. For example, if your web server has the IP address
184.108.40.206, you would create an A record with that as the value to point your DNS to your web server. You can also create “AAAA Records,” which point to IPv6 addresses.
It’s worth noting that if you’re using Amazon’s Route 53 DNS service, you can create a special kind of A record called an “A Alias Record.” This can be used to map an A record to a domain name of another AWS resource, like a load balancer, or CloudFront distribution. This isn’t possible with normal A records; under the hood, AWS dynamically updates the record to route to the resource. if You’d like to learn more, you can read our guide to setting up Route 53.
The second most common record is a “CNAME Record.” Rather than pointing to an IP address, a CNAME record points to another domain name. This is useful for creating aliases, or for mapping to something that doesn’t have a fixed IP address. For example, you may map
CNAME records are also used for domain verification. If you’re generating an SSL certificate, used to secure your site with HTTPS, you’ll be asked to create a new CNAME record in your DNS with a string of random characters. This verifies that you control the domain and are able to modify the records. “TXT Records” are also used for this purpose, which don’t have any function other than storing some info for verification.
“MX Records” are used for routing Email using your custom domain. If you’re setting up a service like G Suite for business email, this is used to verify domain ownership. For example, you might be asked to create an MX record that points to
ASPMX.L.GOOGLE.COM. MX records also have a priority value, used in case one of the mail servers is down; lower priority numbers will be chosen first. Usually, you’ll set the hostname to be the naked domain name (
@), unless you want to receive mail on a subdomain.
How to Edit Your DNS Settings
To edit your DNS settings, you’ll need to sign into your account with your DNS provider, and find the settings for your domain. If you don’t know who controls your DNS, you can use ICANN’s lookup tool, which will tell you under “Registrar Info.”
If you’re currently on a shared hosting plan with a service like GoDaddy, and are looking to move to a different web host, you can transfer domains to a different DNS provider quite easily. We recommend Google Domains and AWS Route 53, both for their performance, configurability, and ability to lock down your primary account with advanced protection—after all, your domain name controls access to your website, and is very important.
Whatever provider you’re using, you’ll probably see a screen like the following (taken from Namecheap DNS), with a table of DNS records:
You can add or remove records from this table to modify your configuration. However, you likely won’t see updates right away. Most of the time, it will only take 5-10 minutes to start seeing updates, but some providers recommend allowing up to 24 hours for worldwide propagation. This is one of the benefits of a premium DNS—Route 53 boasts propagation times under 60 seconds.
Once the DNS updates, you might also need to wait a few minutes until your browser cache removes the stale response. This will take longer if you have a higher TTL for your records.