Connect your domain to your website: DNS records explained
A plain-English guide to connecting your domain: what A, CNAME and TXT records do, www vs. root domain, how long propagation takes, and the mistakes to avoid.
By the Presora team · · 7 min read
To connect a domain you own to your website, you add a few DNS records wherever your domain's DNS is managed, usually at the company you bought it from. Typically that means an A record pointing your root domain (yourbusiness.com) to your website host's IP address, a CNAME record pointing www to your host, and sometimes a TXT record that proves you own the domain. Changes usually work within a few hours, but can take up to 48 hours to reach everyone.
That is the whole job. The rest of this guide explains what each record does in plain English, so you can follow your host's instructions with confidence and fix things when they don't work.
First, the three pieces involved
- Your registrar is the company you bought the domain from and pay each year to keep it.
- Your DNS provider is where your domain's records live. This is often the registrar, but not always. If you have ever moved your domain to a service like Cloudflare, or set it up through a website builder, the records may live there instead.
- Your website host is where the site itself runs. It tells you which records to add.
Think of DNS as the internet's address book. Your domain is the name; DNS records tell browsers, email servers and other services where to go for each thing. The most common reason for "I added the record and nothing happened" is editing records at the registrar while the domain actually uses a different DNS provider. To check, look up your domain's NS (nameserver) records with a free tool such as Google's Admin Toolbox Dig. The nameservers tell you which company's records are in use.
A record: points a name to an IP address
An A record connects a domain name to an IPv4 address, the numeric address of a server, such as 203.0.113.10. It is the record most hosts ask you to set for your root domain, sometimes called the apex or "naked" domain: yourbusiness.com with nothing in front.
In most DNS dashboards it looks something like this:
| Type | Name / Host | Value / Points to | TTL |
|---|---|---|---|
| A | @ | 203.0.113.10 | Auto or 3600 |
The @ symbol means "the root domain itself." The IP address here is an example; use the one your host gives you. You may also see AAAA records, which do the same job for longer IPv6 addresses.
CNAME record: points a name to another name
A CNAME (canonical name) record says "this name is an alias for that other name." Instead of an IP address, its value is another domain, such as sites.yourhost.com. Hosts like CNAMEs because they can change the server behind that name without you having to update anything.
| Type | Name / Host | Value / Points to |
|---|---|---|
| CNAME | www | sites.yourhost.com |
There is one important rule. Under the original DNS specification, RFC 1034, a name that has a CNAME should have no other records. Your root domain always has other records (at minimum its nameserver records, and usually email records too), so a standard CNAME can't go there. That is why hosts usually give you an A record for the root and a CNAME for www. Some DNS providers offer a workaround, called CNAME flattening at Cloudflare and ALIAS or ANAME elsewhere, which lets you point the root at a name while still following the rules.
TXT record: a note that proves something
A TXT record holds a piece of text. Other services read that text to confirm facts about your domain. The most common uses:
- Ownership verification. Your website host, Google Search Console or another service gives you a unique code to publish as a TXT record. When the service finds it, it knows you control the domain. Google Search Console, for example, requires DNS verification for a domain-wide property, and says to leave the record in place after verification succeeds, or you can lose verification later.
- Email security. SPF, DKIM and DMARC records, which help receiving mail servers decide whether email claiming to be from your domain is genuine, are published as TXT records.
A domain can have many TXT records at once, so adding a new verification record should never mean deleting an existing one.
Records to leave alone
When you open your DNS settings you will probably see other records. Unless your host tells you otherwise, don't touch them:
- MX records route your email. Delete or change them and email to your domain may stop arriving.
- NS records say which DNS provider is in charge. Changing these moves your whole DNS setup.
- Existing TXT records may be verifying other services or protecting your email.
- CAA records, if you have any, list which certificate authorities may issue SSL certificates for your domain. If your new host uses a certificate authority that isn't listed, its certificate can be refused. Let's Encrypt's CAA guide explains how these work. If you have no CAA records, there's nothing to do.
www or no www?
yourbusiness.com and www.yourbusiness.com are technically two different names, and each needs its own record. Customers will type both, so set up both. Then choose one as your main address and have the other redirect to it. Which one you choose matters much less than being consistent, so that your links, business listings and search results all use the same version. Many hosts handle the redirect for you once both records are in place.
Propagation and TTL: why changes aren't instant
When someone visits your site, their device or internet provider looks up your DNS records and keeps a copy for a while, so it doesn't have to ask again every time. How long it keeps that copy is set by each record's TTL, or time to live, measured in seconds. A TTL of 3600 means one hour. As Cloudflare's TTL documentation puts it, a longer TTL means updates to your records take longer to take effect.
This is what people mean by DNS propagation. The new record is live immediately at your DNS provider, but people who looked up the old record keep using it until their copy expires. GoDaddy's help center says changes usually propagate within a few hours but advises allowing up to 48 hours. If you are moving an existing website, one useful trick is to lower the TTL on the old records a day or so before the switch, so the change spreads faster when you make it.
Step by step
- Find out which company manages your DNS (check the nameservers, as described above) and log in there.
- Copy the exact records your website host gives you. Don't retype IP addresses or long codes from memory.
- Look for any existing A, AAAA or CNAME records on the same names (@ and www) that point to an old host. Remove or replace those, since conflicting records cause unpredictable results.
- Add the new records: usually an A record for @, a CNAME for www and a TXT record for verification.
- Save, then wait. Check progress with a DNS lookup tool rather than refreshing your browser, since your own device may have the old answer cached.
- Once your host confirms the domain, check that both versions load over HTTPS and that one redirects to the other.
Common mistakes
- Editing the wrong DNS provider. If your nameservers point elsewhere, changes at your registrar do nothing.
- Typing the full domain in the name field. Many dashboards add your domain automatically, so entering "www.yourbusiness.com" creates www.yourbusiness.com.yourbusiness.com. Usually you enter just
www, or@for the root. - Leaving old records behind. An old A or AAAA record alongside the new one can send some visitors to your old site.
- Putting a CNAME on the root domain when your provider doesn't support flattening.
- Breaking email. Deleting MX records, or adding a second SPF record instead of editing the existing one. The SPF standard, RFC 7208, says a domain must not have multiple SPF records.
- Using domain forwarding instead of DNS. Many registrars offer "forwarding" or "masking" that redirects visitors elsewhere. That only sends visitors on to another address. It isn't the same as connecting your domain with DNS records, and it isn't what your host's instructions mean.
- Removing a verification record afterward. Some services check again periodically. Leave it in place.
- Panicking after ten minutes. Give it a few hours before changing things again. Repeated edits can make caching harder to reason about.
Common questions
How long does DNS propagation take?
Usually within a few hours, but allow up to 48 hours. How long it takes depends mostly on the TTL (time to live) of the old records, which controls how long other systems keep a cached copy before checking again.
Can I use a CNAME record for my root domain?
Not under the standard DNS rules, because a CNAME can't share a name with other records and the root domain always has other records. Some DNS providers offer a workaround called CNAME flattening, ALIAS or ANAME. Otherwise, use the A record your website host gives you for the root domain and a CNAME for www.
Where Presora fits
Every Presora site gets a free yourname.presora.co address, so you can go live before touching DNS at all. On the Growth and Enterprise plans you can connect a domain you already own: Presora shows the exact records to add (an A record, a TXT verification record and an optional CNAME for www) and issues the SSL certificate automatically once they're in place. More on Presora's website hosting.