↑↓ to move ↵ to open Esc to close Browse all tools

Website guide

Domain, DNS and Hosting: What Each One Does

A website needs three things that are easy to confuse because one company often sells all of them. The domain is the name, rented from a registrar. Hosting is the server that stores and sends the pages. DNS is the system of records that tells every browser which server answers for the name. Here is what each part does, who is behind it, the records you will actually edit, and what to change when you move.

Three parts, three jobs

PartWhat it isIf it fails
Domain nameThe name, rented from a registrar for a set termNothing resolves once it lapses
DNSThe records that map the name to serversThe name points nowhere, or to the wrong server
HostingThe server that stores and sends the siteThe name resolves, but nothing answers

The split matters when something breaks or when you switch providers. A site can be down because the domain expired, because a DNS record points to an old server, or because the server itself is down, and each has a different fix. The checks in is the website down or just me go through them in order.

The domain: a registration, not a purchase

Three parties are involved in every domain. The registrant is you. The registrar is the company you pay; ICANN describes an accredited registrar as an entity that offers domain name registration services to registrants. The registry runs the top-level domain itself, such as .com or .org, and keeps the master list of names in it. ICANN sits above them: it draws up contracts with each registry and runs the accreditation system for registrars. It does not control what you put on your site.

You do not buy a name outright. ICANN's renewal FAQ says a registration is for a set period, typically one to ten years, and you keep it by renewing through your registrar. ICANN policy requires registrars to send two renewal reminders. As a registrant you must keep your contact details accurate for directories such as WHOIS and answer your registrar's inquiries within 15 days. The WHOIS lookup shows a domain's registrar, creation date and expiry date. What happens after an expiry date passes is laid out step by step in what happens when a domain expires.

There are many endings to choose from. IANA's list of top-level domains had 1,436 entries on October 30, 2026. The guide on choosing a domain extension compares them.

DNS: the records that connect name and server

DNS is a distributed lookup. At the top sits the root zone, which IANA manages; it says which name servers are responsible for each top-level domain. IANA lists the root servers as 13 named authorities, a.root-servers.net through m.root-servers.net, which in reality are hundreds of servers in many countries. The .com servers in turn know which name servers hold the records for example.com, and those answer the actual question.

The records for your domain live in a zone at your DNS provider, which is often the registrar or the host. These are the ones you will edit:

TypeNo.HoldsExample value
A1An IPv4 address203.0.113.10
AAAA28An IPv6 address2001:db8::10
CNAME5The canonical name this name is an alias forshop.example.net.
MX15A mail server, with a preference (lower wins)10 mail.example.com.
TXT16Text strings, used for verification and mail rules"v=spf1 -all"
NS2An authoritative name server for the zonens1.dnshost.example.

Three rules from the RFCs explain common setup errors. First, RFC 1034 says that if a CNAME is present at a name, no other data should be present. That is why the bare domain, which must carry NS records, cannot simply be a CNAME, and why hosts give you A and AAAA addresses for it instead. Second, MX records carry a preference number, and RFC 1035 says lower values are preferred, so 10 mail1 is tried before 20 mail2. Third, every label between dots can be at most 63 octets and a whole name at most 255.

TXT records do a lot of quiet work: proof that you control a domain, such as the DNS record Search Console checks for a Domain property, and the SPF and DMARC rules that the SPF, DKIM and DMARC guide explains. The DNS lookup shows every record a domain publishes, with its TTL.

TTL: why changes take time

Every record has a TTL. RFC 1035 defines it as the time interval, in seconds, that a record may be cached before it should be discarded. Resolvers at internet providers and in offices may keep answers that long. After you change a record, anyone whose resolver fetched the old one just before can keep getting it until the TTL runs out:

TTLOld answer may live for up to
3005 minutes
3,6001 hour
14,4004 hours
86,4001 day

So the trick for a planned move is to lower the TTL to 5 minutes at least one old TTL before the switch. If the record had 86,400, lower it a day ahead. On moving day the change then spreads within minutes, and afterwards you can raise the TTL again.

Hosting: the server that answers

Hosting is the computer that holds the files or runs the application and answers requests on ports 80 and 443; the guide to common port numbers explains those. Hosting ranges from free plans for static sites to managed servers. The free website hosting list compares free plans, and the free website builders list covers builders with a free plan. A CDN can sit in front of any host to answer from servers near your visitors.

The website cost calculator adds up what the parts cost together: the domain renewal every year, the hosting plan, and everything else a site needs.

Worked example: switching hosts, keeping the domain

A site at example.com runs on host A. The domain is registered at a registrar, which also runs the DNS. The owner moves to host B:

  1. Look up the current records with the DNS lookup and note the TTL of the A record, say 14,400 seconds, 4 hours.
  2. At least 4 hours before the move, lower that TTL to 300.
  3. Copy the site to host B and test it there, using a temporary address if host B provides one.
  4. Change the A record, and AAAA if there is one, to host B's addresses. Leave MX and TXT records alone, or mail stops.
  5. Keep host A running for a day or two while the last cached answers expire, then cancel it.
  6. Raise the TTL back to its old value.

The domain never moved; only one DNS record changed. Moving the domain itself to another registrar is a separate step, and changing the domain name is a site move of its own, covered in how to move a website to a new domain.

Frequently asked questions

What is the difference between a domain and hosting?

The domain is the name people type, such as example.com, registered through a registrar for a term of usually one to ten years. Hosting is the server that stores the website and sends it to visitors. DNS connects the two: its records tell browsers which server answers for the name. You can buy all three from one company or each from a different one.

Do I own my domain name?

You hold a registration for a set period, which ICANN says is typically one to ten years, and you keep it by renewing. If you do not renew, the name can eventually be released and registered by someone else. ICANN also requires registrants to keep their contact information accurate.

How long does a DNS change take?

As long as the old record's TTL, in most cases. RFC 1035 defines the TTL as the time in seconds a record may be cached before it should be discarded. With a TTL of 3600, resolvers that fetched the old record just before your change can keep using it for up to an hour. Lower the TTL a day ahead of a planned move, then raise it again afterwards.

Can I point my domain at a different host without moving the domain?

Yes. The registration stays with your registrar; you only change the DNS records, usually the A and AAAA records or a CNAME, to the new host's addresses. If the new host also runs your DNS, you change the NS records at the registrar instead.

What is a registrar and what is a registry?

A registrar is the company you buy the domain from; ICANN calls an accredited registrar an entity that offers domain registration services to registrants. A registry runs a whole top-level domain such as .com and keeps its master list. ICANN draws up contracts with each registry and runs the accreditation system for registrars.

Sources