Guides DNS

What is DNS?

How do visitors find the website behind example.com? Learn where to set its address, how to check it and how to make changes safely.

When a visitor types example.com, their computer first looks up your web server’s internet address. DNS is the system that does that lookup. Your domain’s DNS settings specify which address visitors receive.

Check DNS on your own domain

From example.com to your website

Suppose your website is already hosted. The host gives you an internet address for its web server, such as 192.0.2.44. This is called an IP address. In the DNS settings for example.com, you associate that name with that address. This address is an example. For your own website, use the address supplied by your host.

A visitor types example.com. Their computer asks a DNS service for the address. The browser can then use the answer to connect to the web server. DNS helps find the address. The web server still has to deliver the website.

Where do you set the address?

Open the control panel of the company managing your DNS. The association appears as a line with a name and a value. That line is called a DNS record. For the address above, it is an A record for example.com. The DNS record types guide shows which fields to enter.

Use the details supplied by your host. After saving, check the DNS answer first, then open the website. Saving the right address does not create a website or automatically set up a working secure connection.

Nameservers: where your records live

A domain’s nameservers give the official answers about its DNS records. Your DNS provider usually operates them. That may also be your host or registrar. The registrar is the company where your domain is registered. Through that registrar, you specify which nameservers serve the domain.

Only changing your website’s IP address? You usually change an A or AAAA record at your existing DNS provider. Changing nameservers moves management of all DNS settings. Prepare all the required records there first, including mail, verification and security settings.

TTL and propagation: why a change takes time

Each record has a TTL (Time To Live): the number of seconds a DNS service may remember its answer. A TTL of 3600 allows caching for up to an hour. A service with an old answer in its cache will therefore not see your change immediately. That difference is often called propagation.

For a planned address change:

  • Your current A record has a TTL of 3600. Lower it to 300 seconds.
  • Check that the lower TTL is active on your nameservers. From that point, wait at least the old TTL: one hour in this example. Answers fetched earlier may still have a TTL of 3600.
  • Then change the address. Check the DNS answers and the actual website, and keep the old service available during the transition.
  • Raise the TTL again once the new setup is stable.

Lowering the TTL at the same time as changing the address does not shorten existing caches. Delegation data such as NS and DS has its own cache times. An earlier answer saying that a name or record is absent can also be cached. There is no fixed waiting period that covers every DNS change.

Checking what actually changed

Suppose you changed the A record for example.com to 192.0.2.44. First check that your own nameserver returns the new value for that exact name and record type. An administrator could use dig @ns1.example.net example.com A, for example. These names and the address are examples: replace them with your own values.

Then query the same name and type through public DNS services. DNS Radar can show their answers side by side. If the nameserver has the new value but a public service still has the old one, a cache may explain the difference. If your nameservers themselves disagree, have the publication checked first.

An answer saying a name or record is absent is different from SERVFAIL or a timeout. Those outcomes mean the query failed. The record may still exist. Finally, test the website or mail service itself. A correct DNS address does not prove that the server accepts connections or has a suitable certificate.

Moving safely to different nameservers

  • Save or export all old DNS settings and compare them with the new settings. Include subdomains, mail records and verification codes.
  • Have the administrator query the new nameservers directly before switching. They should already return the intended answers.
  • Using DNSSEC? Agree with both providers how signing and the DS link will work throughout the move. Follow the DNSSEC guide. Do not simply turn signing off.
  • Then change the nameservers at the registrar. Keep the old DNS service active while old delegation data may still be used. Ask the providers to determine the necessary overlap.
  • During the transition, check both DNS services and test the website, incoming mail and other important services. Keep the old settings available in case recovery is needed.

How a lookup works

Type example.com, and your computer asks for the address through a 'resolver' (usually your internet provider's, or a public one like Google or Cloudflare). That resolver looks it up in steps:

  • first the root: 'who runs .com?'
  • then the TLD .com: 'who runs example.com?'
  • then your nameservers: 'what is the address of example.com?'

Each answer is briefly remembered (cached) along the way, so the next lookup doesn't have to walk the whole route again. That's why a lookup usually takes only a few milliseconds, even with billions of names.

Domain, zone and records

A domain name reads right to left, getting more specific: in mail.example.com, .com is the TLD (top-level domain), example.com is the main domain, and mail is a subdomain. Everything you set for your domain (addresses, mail servers, security) lives in the 'zone': the collection of your domain's DNS records.

A 'record' is one line with a type (e.g. A or MX) and a value. Which types exist and what you use them for is covered in the guide on DNS record types.

Common mistakes

  • Calling a change 'broken' too soon: give propagation time (TTL)
  • Assuming your registrar and DNS provider are the same company: the registrar handles the registration, while the DNS provider manages the records
  • A typo in a record: one wrong character and the website or mail won't work
  • During a move, turning off the old DNS too soon, before the new nameservers are known everywhere

Primary sources

Frequently asked questions

What's the difference between DNS and an IP address?

An IP address is a server's actual address (a string of numbers). DNS is the system that translates the name you type into that IP address. The name is for people, the IP address for computers.

What is a resolver?

The service that does the lookup for you: it finds the right answer step by step and remembers it briefly. Often your internet provider's, or a public one like 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare).

How long does a DNS change take?

It depends on the old TTL, processing at the DNS provider and the kind of change. A cache may keep using an earlier answer until its lifetime expires. For a planned change, lower the TTL in advance and first wait out the old cache lifetime. Nameserver or DNSSEC changes require extra steps. Do not assume a fixed 24 or 48 hours.

What's the difference between registrar, DNS provider and hosting?

The registrar is where you hold the domain (the registration). The DNS provider manages your records (the nameservers). Your host runs your website or mail. These can be three different parties, or all the same one.

Is DNS secure?

Ordinary DNS provides no cryptographic proof that an answer comes from the correct source. DNSSEC adds that check. DoH and DoT encrypt the connection to your DNS service. They do not replace DNSSEC. The DNSSEC guide explains the chain of trust and safe setup.

Check DNS on your own domain →