Skip to content
ForgeBase is open source.View on GitHub
FutureForge
InfrastructureDNSHostingBeginners8 min read

How does a domain name and DNS take a website live?

A domain goes live when its DNS records point to your server's IP. How registrars, registries, DNS hosts and web hosts fit together, plus HTTPS.

By , Co-founder

How does a domain name and DNS take a website live?

A website goes live when three things line up: you have registered a domain name, the domain's DNS records point to the IP address of your server, and that server is set up to answer for the domain. When someone types your address, their device asks DNS for the IP address, connects to your server, and your server sends back the site. HTTPS adds a certificate on top so the connection is encrypted.

Who are the registry, registrar, DNS host and web host?

Four roles are involved, and one company often does several of them.

RoleWhat it doesExample for a .in domain
RegistryRuns the master database for a whole extension, like .com or .inNIXI, through registry.in
RegistrarThe shop where you buy, renew and manage the domainAny accredited .in registrar
DNS hostRuns the nameservers that answer questions about your domainYour registrar, Cloudflare, your VPS provider
Web hostThe server that stores and serves your siteYour VPS, shared hosting, a platform like Vercel

You, the person or business registering the name, are the registrant. ICANN explains that when you register a domain, you enter a contract with the registrar.

The key link is the nameserver setting. At your registrar, you choose which DNS host is authoritative for your domain. The registrar passes that to the registry, and from then on, anyone looking up your domain is sent to those nameservers. Whatever records you set there are what the world sees.

What happens when someone visits your site?

Simplified, a visit to www.example.in goes like this:

  1. The browser asks a resolver (usually run by the internet provider, or a public one) for the IP address of www.example.in.
  2. If the resolver has a recent answer cached, it returns it straight away.
  3. If not, it asks the root servers, which point it to the .in servers, which point it to your nameservers.
  4. Your nameservers return the record, for example an IP address.
  5. The browser connects to that IP address and asks for www.example.in. Your web server reads the name and serves the right site.

Step 5 matters. One server can host many sites, so it must be configured for your domain. DNS only gets the visitor to the door.

Which DNS records do you need?

These five record types cover almost every small business site.

RecordWhat it doesTypical use
AMaps a name to an IPv4 addressexample.in → your VPS IPv4
AAAAMaps a name to an IPv6 address (RFC 3596)example.in → your VPS IPv6, if it has one
CNAMEMakes one name an alias of another namewww → example.in, or a subdomain → a platform's hostname
MXSays which servers receive email for the domainYour email provider's mail servers
TXTHolds text, often for verification and email policySPF, DKIM, DMARC, ownership checks

A few rules catch people out:

  • CNAME cannot sit beside other records. RFC 1034 says that if a CNAME is present at a name, "no other data should be present". The bare domain (example.in) always has other records, such as NS, so it cannot be a plain CNAME. Use an A record there, or your DNS host's "ALIAS" or "flattening" feature if it has one.
  • MX records have a priority number. Under RFC 5321, mail servers try the lowest number first. Your email provider will tell you which values to use.
  • Do not break your email when moving websites. Changing where the site lives only needs the A, AAAA or CNAME records. Leave MX and the email TXT records alone unless you are moving email too. Changing the app you read mail in, say to read several email accounts in one inbox, does not touch these records either.

What are TTL and DNS propagation?

Every DNS record has a TTL (time to live), in seconds. RFC 1034 describes it as "a time limit on how long an RR can be kept in a cache." If your A record has a TTL of 3600, a resolver that looked it up may keep using that answer for up to an hour.

"DNS propagation" is mostly this caching. Nothing is pushed around the internet. When you change a record, resolvers that have the old answer keep it until their copy expires, then fetch the new one. So different people see the change at different times.

Changing nameservers usually takes longer than changing a record, because the delegation itself is cached too.

Two practical habits:

  • Lower the TTL before a planned move. A day or so before, set the record's TTL to something short, like 300 seconds. Wait for the old TTL to run out, make the change, and confirm it works. Then raise the TTL again.
  • Check from the command line, not just your browser, which has its own cache. Make both www and the bare domain work, and redirect one to the other.
dig +short example.in A
dig +short www.example.in
dig +short example.in NS

How do you point a domain at a VPS?

Assuming you already have a VPS with a public IP address (if not, start with what a VPS is and how it works):

  1. Find the server's IP addresses in your provider's dashboard, or on the server with ip -4 addr and ip -6 addr.
  2. At your DNS host, create the records:
    • A for @ (the bare domain) → your IPv4 address
    • AAAA for @ → your IPv6 address, if you have one
    • CNAME for www → example.in
  3. Configure the web server to answer for both names. In Nginx, that is the server_name line.
server {
    listen 80;
    listen [::]:80;
    server_name example.in www.example.in;
    root /var/www/example;
}
  1. Open the firewall for ports 80 and 443. Our new VPS security checklist covers setting up ufw safely.
  2. Test with dig until the new IP appears, then load the site over plain HTTP before adding HTTPS.

How do you add HTTPS with Let's Encrypt?

Let's Encrypt issues free certificates automatically. It has to confirm you control the domain, which is why DNS must already point at your server before you request one.

With Nginx on Ubuntu, the Certbot instructions use the snap package:

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/local/bin/certbot
sudo certbot --nginx -d example.in -d www.example.in

Certbot edits the Nginx config and installs a timer that renews certificates before they expire. Test renewal once:

sudo certbot renew --dry-run

Automation matters more each year. Let's Encrypt certificates currently last 90 days, but the company has announced that its default lifetime drops to 64 days on 10 February 2027 and to 45 days on 16 February 2028. It warns that a hard-coded 60-day renewal schedule will no longer be enough. Let your ACME client decide when to renew, and never renew by hand.

What is different about .in domains?

The .in extension is India's country-code domain. A few specifics, from the .IN Registry FAQ:

  • NIXI runs the registry. The National Internet Exchange of India operates .in under the Registry.in name.
  • You buy through an accredited registrar. The registry publishes the list, and it does not set the prices registrars charge you, so prices vary.
  • There are many second-level options, such as .co.in, .org.in, .net.in and .firm.in, and the IDN extension .भारत for names in Indian scripts.
  • The maximum registration period is 10 years.
  • One- and two-character .in names are reserved and not available to the public.
  • Expiry has grace periods. After a domain is deleted, there is a 30-day redemption period in which only your registrar can restore it. Expect your website and email to stop working until it is renewed.

Turn on auto-renew and keep the registrant email current. A missed renewal is a more common way to lose a site than any technical failure.

Frequently asked questions

Should my DNS be with my registrar or somewhere else?

Either works. Keeping it at the registrar is simplest. Moving it to a dedicated DNS host can give faster changes, better tools and features like CNAME flattening. Whichever you choose, protect that account with two-factor login.

Why does my site work for me but not for a colleague?

Their resolver probably still has the old answer cached. Wait for the old TTL to pass, and check with dig against a public resolver. If it still fails, check the web server is configured for that exact name, including www.

Can I use a domain from one company with hosting from another?

Yes. That is normal. Point the DNS records at your host, or change the nameservers to a DNS host you prefer. The registrar only needs to hold the registration.

Getting it live

Register the domain with auto-renew on, add A, AAAA and CNAME records for your server, configure the web server, then add HTTPS with automatic renewal. Most problems come from caching, a missing www, or an expired registration.

If you would like your site, server and certificates set up and monitored for you, see our DevOps service.

About the author

Nahal

Co-founder, FutureForge Studios

Self-taught sysadmin working across mechatronics, embedded systems and IoT. Builds projects involving autonomous drones, smart antenna positioning, code and hardware.

More from Nahal
Related serviceDevOpsDeploys, servers, monitoring

Working on something like this?

Send us the problem. A person reads it and replies within one working day.