11. Domain Names — Who Actually Owns What
“The internet’s address book is written in pencil, and somebody else is holding the eraser.”
The story: the $12 google.com
Section titled “The story: the $12 google.com”In September 2015, a student named Sanmay Ved found a flaw in Google Domains, the company’s own service for buying names, and used it to register google.com for about twelve dollars. Nobody broke into a server. He went through the checkout, the same door you use, and for a short while the most famous name on the internet sat in his account. Google fixed the flaw, took the name back, and paid him a bug reward. He gave the reward to charity, and it was reportedly doubled in the process. Treat the amounts as a widely told story with a paper trail, which is roughly what they are.
The lesson is not that Google was careless. The lesson is that a domain name is a record in someone else’s office, and the people who write that record are not always the people you pictured when you typed the name into your browser.
Here is the less fun version, which happens every week somewhere. Picture a small design studio in Pune. This is a composite, stitched together from stories people tell at meetups, not one real studio. It has a website, a shared inbox on its domain, and a payments webhook on a subdomain. The founder bought the name five years ago with a card that has since been replaced. The renewal reminder went to an inbox nobody reads. One Tuesday the website stops answering, client emails bounce, and the registrar’s page says the domain is “in redemption”. That is a polite way of saying it now costs a lot to get back. By the time the card is fixed, a stranger has bought the name and the studio has been without email for three days.
Nothing in that story needed a clever attacker. It needed a gap between who you think owns a name and who the registry actually recognises. This chapter walks the chain of roles behind every name, from the rule-makers at the top to the login screen at the bottom. Book 1 explained how a name becomes an address, in its DNS material in The Glue, chapter 5. Here we go one level up, to the offices that keep the records.
The cast: five roles, one name
Section titled “The cast: five roles, one name”Every domain name has a small cast, and most of the confusion comes from assuming the cast is one company. Think of a land registry. You want to know who owns a plot in a city. The rules come from one place. The district land office keeps the official book. A property agent handles the paperwork. You are the name on the deed. A surveyor’s office publishes the map that tells people where the plot is. Five roles, and any one of them can be a different company from the others.
Here they are, top down.
ICANN sets the rules. It is a non-profit that coordinates the global namespace: which endings exist, how registries and registrars are accredited, and what they must do for transfers, renewals and expiry notices. ICANN does not sell you a name and does not keep a database of .com names. Think of it as the body that writes the land law and licenses the offices that apply it.
Registries run a top-level domain, the part after the last dot. Verisign runs .com and .net. NIXI, the National Internet Exchange of India, runs .in. A registry keeps the authoritative list of which second-level names exist under its ending and which nameservers each one points to. That list is the district office’s book. When a registry is wrong, the whole ending is wrong, which is why registries run with a great deal of paranoia and very boring processes. Many outsource parts of their back office to contractors. The details are not something most of us can check, so treat “who runs the back office” as a question with a hedged answer.
Registrars are where you buy. GoDaddy, Namecheap, Cloudflare Registrar, Google’s successors, and a long tail of regional sellers are all registrars. A registrar is accredited by ICANN and talks to the registry on your behalf. It takes your money, holds your contact details, and submits the changes you ask for. The registrar is the property agent: the person who runs the transaction and keeps your paperwork, but does not own the land.
Registrants are you, or whoever is named on the record as the owner. The registrant is the legal holder of the registration, and this is the role people forget. Your login at the registrar is only a way of controlling the registrant record. If the registrant’s email points to an inbox nobody reads, you have a problem, even when everything else is fine.
DNS hosts answer the questions. When a resolver asks for the address of app.pipeslab.in, some server has to reply with the zone data. That server belongs to the DNS host, which may be your registrar, Cloudflare, your VPS provider, or a dedicated DNS company. The DNS host publishes your directory entry. It is the surveyor’s office that draws the map people read every day.
Look at what the figure does not show: a single company. The registry and the registrar are usually different organisations. The DNS host is often different from both. The only role everyone agrees on is the one that writes the rules, and that is the one you will never talk to.
The classic mix-up is the sentence “my domain is with Cloudflare”. It can mean three different things: you bought the name there, you answer its DNS there, or you proxy your traffic through it. Those can be three separate settings, and the difference only becomes visible in an outage. We will untangle them in the next section.
Nameservers: what “point it to Cloudflare” really changes
Section titled “Nameservers: what “point it to Cloudflare” really changes”When someone says “I moved my domain to Cloudflare”, the useful question is which part they moved. Most of the time they changed the nameservers. A nameserver setting is a delegation. It is the registry’s way of saying: for questions about this name, ask these servers, not me.
Follow one lookup. Your phone asks a resolver for the address of app.pipeslab.in. The resolver does not know the answer, so it asks the root, which points it at the .in servers. The .in servers, run by NIXI, do not hold the answer about app. They know one thing about pipeslab.in: its NS records, which are the names of the servers that hold its zone. The resolver then asks one of those servers, and that server holds the real records, including the A record for app that says 203.0.113.10.
So the NS records at the registry are a pointer, and the zone at the DNS host is the content. Changing the nameservers changes the pointer. It does not copy anything, and it does not move your records for you. You still have to create the zone at the new host and add every record: the A records, the MX records for email, the TXT records for verification. If you forget the MX records, you have not moved your email. You have deleted it, and a client will tell you so.
The change also takes effect in stages. The new NS records are written at the registry, and then resolvers around the world keep their cached copies of the old NS records until the cache time runs out. For delegation records the cache can be a day or more. For a while, some visitors go to the old host and some go to the new one. Both should return the same answers if you copied correctly, which is why the right order is copy first, switch second, and retire the old zone last.
The best way to run this move is boring. Export or write down every record at the old host, build the zone at the new host, and check the answers there before you touch the registry. Then change the NS records once, leave the old zone running for at least the old cache time, and only then delete it. The team that deletes the old zone on the same afternoon as the switch learns about caching the hard way. That story is a composite, stitched from several migrations, not one team’s postmortem, but the mail outage it describes is very common.
The orange-cloud proxy is a third thing, and it is worth keeping separate. Cloudflare’s proxy answers with Cloudflare’s own addresses and forwards traffic to your server. That only works when Cloudflare is your DNS host, so it requires the nameserver move. The nameserver move does not require a transfer of the registration. You can keep the name at the registrar where you bought it and still point the zone anywhere. We will do this move for real in Chapter 17, and Chapter 10 covers the record types in detail.
TLDs: not every ending is the same kind of thing
Section titled “TLDs: not every ending is the same kind of thing”The part after the last dot looks like one kind of thing. It is really several kinds, with different owners and different rules, and the differences show up on your bill.
Generic endings (gTLDs) are the familiar ones: .com, .net, .org, .info. Their registries run them under contract with ICANN, and the rules are mostly the same across the board. Verisign’s .com is the largest by a wide margin.
Country endings (ccTLDs) are two letters and belong to a country: .in, .uk, .de. The national operator sets the rules, and they vary a lot. Some are open to anyone in the world. Others ask for a local contact, a local presence, or a document. NIXI runs .in, and it also runs the second-level names people often want, such as .co.in, .net.in and .org.in. Each of those carries its own eligibility and dispute rules. A name under .co.in and a name under .com do not share a rulebook, even though they look identical on a business card.
Newer generic endings arrived in a large wave after ICANN opened the namespace in the early 2010s. There are now hundreds, from .app and .dev to .studio and .shop. Many are cheap in their first year and ordinary afterwards. Some are sold as premium names, priced name by name by the registry or the registrar.
One detail from the newer wave matters for web work. A handful of endings, .dev and .app among them, are on the HSTS preload list that browsers ship with. That list tells a browser to insist on HTTPS for every name under the ending before it asks the server anything. You cannot serve a plain HTTP site there, and you need a certificate in place before anything loads. Chapter 9 explains why. If you picked one of those endings without knowing it, your first deploy will look broken until HTTPS is ready.
Why some names are cheap to buy and expensive to keep. A registry sets a wholesale price per name per year. Registrars set a retail price on top, and they often discount the first year to win the sale. The renewal is a separate line on the same price list, and it is the line that matters. On a premium name, the renewal can be many times the first payment. The first payment is the hook. The renewal is the rent.
WHOIS, RDAP, and the privacy question
Section titled “WHOIS, RDAP, and the privacy question”When you want to know who a name belongs to, you ask the directory. The oldest directory protocol is WHOIS, from the early days of the internet. You open a connection on TCP port 43, send the name, and get back a block of plain text. Every registry and registrar formatted that text its own way, which made it fragile for software to read. Over the 2010s the community moved toward RDAP, the Registration Data Access Protocol. RDAP speaks JSON over HTTPS and has a standard shape for its answers. Many endings now serve RDAP, and many tools fall back to WHOIS for the rest. You will meet both, and the rollout across endings has been uneven.
For a registered name, the answer usually gives you the registrar, the creation and expiry dates, the status flags (the lock, which we reach in the next section), and the nameservers. That is most of what you need when something feels off. Read it before you guess.
For a long time, the registrant’s name, email, phone and postal address sat in that answer for anyone to read. Spammers harvested it, and so did people with less friendly intentions. When European privacy law tightened in 2018, many registries and registrars started redacting the personal fields by default. In their place you often see a placeholder, or the registrar’s own privacy service.
That is a good default for a person, and the data does not vanish. The registrar still holds it, and there are legitimate routes to request it. For you the practical point is simpler. The public answer may tell you less than it used to, so check the dates and nameservers there, and check the contact details through your own account, not through the public lookup. The contact email on your account matters more than the one in the lookup, and we come back to it when we talk about recovery.
Locks and transfers: the two keys to your name
Section titled “Locks and transfers: the two keys to your name”Picture a flat you own, managed by a property agent. The agent can post listings, collect rent and call the plumber. But if the agent wants to hand the file to a rival agent across town, two things have to be true. The land office has to allow the move, and you have to sign a transfer letter. Domains work the same way, and the two keys have names.
The first key is the registrar lock. In registry language it is a status flag on the domain, one of the EPP statuses the registry keeps for every name. A flag such as clientTransferProhibited tells the registry to refuse transfer requests for that name until the flag is removed. Your registrar usually sets it for you by default, and the “lock” switch in the panel is normally just a control for that flag.
The second key is the authorisation code, also called the auth code or EPP code. It is a random string the current registrar generates when you ask for it. When you want to move the name to a new registrar, you paste that code into the new registrar’s form. The code proves that the person asking to leave is the person who controls the name. It is a second secret, and that is the point.
A transfer then runs roughly like this. The gaining registrar sends a request to the registry. The registry asks the losing registrar to confirm. The losing registrar checks the lock and the code, and usually emails the registrant about the request. If nobody objects inside a short window, about five days under the policy most registries follow, the transfer goes through. Doing nothing counts as consent. That last detail is the one that bites.
Why do both keys exist? Because transfers became a favourite tool of thieves. A widely told story goes like this: someone with a login to a registrar account started a transfer in the evening, the owner saw nothing until morning, and by then the name had moved to another registrar where getting it back meant a lawyer and several months. The details have grown in the telling, so take them loosely. The pattern is real, and it is why both keys exist.
Most registries also impose a waiting period after a name is first registered or transferred, often around 60 days, before it can move again. If memory serves, that rule is common but not universal, so read your registry’s policy rather than trusting my number.
Some registries offer a stronger version called registry lock. Changes then need out-of-band verification, often a phone call or a signed request, and nobody can make them with a panel click alone. It usually costs extra or depends on a particular registrar, so it is a tool for the names that matter most: the company domain, the domain behind your login page, the domain your email runs on.
The best defence sits between the two keys and the people who hold them. Turn on two-factor authentication at the registrar, so that a password alone cannot change the lock or fetch the code. The next section is about exactly that, and about what happens when nobody renews at all.
Your login is the real front door
Section titled “Your login is the real front door”Everything in the last two sections assumed that the person changing your lock is you. Most days it is. The rest of the time it is whoever has your registrar password, and that password is worth more than most of the others you own, because the name sits above all of them.
Here is what a takeover looks like, in order. An attacker signs in and points your nameservers at a DNS host they control. Within the usual caching window, your website, your API and, in many setups, your email start answering from their zone. They can request a fresh certificate for your name, because the checks follow DNS wherever it now points. Then they change the account’s recovery email, so the one door you could have used to get back in is gone. Nobody touched your server. Somebody took the directory.
Turn on two-factor authentication at the registrar before anything else in this chapter. An authenticator app or a hardware security key beats SMS wherever the registrar offers the choice. Give the account a recovery email on a domain you do not run through that same registrar, so an attacker who has the domain cannot also reset the account. Store the recovery codes in your password manager, and write down who on your team can sign in, because that list is a security control too.
When the renewal is forgotten
Section titled “When the renewal is forgotten”A small business had its domain registered by the founder, on a card that was replaced after a bank reissue. The renewal reminder went to an inbox nobody read. Nothing broke on expiry day. The site kept answering for a while, then showed a parking page, then the shared mailbox started bouncing. The first person to notice was a customer asking why an invoice email had failed. This is a composite, built from patterns people describe often, so treat the details as illustrative.
Expiry is not a switch. It is a set of stages, and the timings below are rough, because they depend on the TLD and on what your registrar adds on top of the minimum.
On expiry day the name is still yours, and most registrars will still take a renewal at the normal price. Many also give a grace window, from none to around 45 days, and that is the cheapest moment to fix things.
When grace ends, the registry moves the name into redemption. The registry now holds it, and getting it back costs many times the renewal price. Around 30 days is common. This is usually when your site goes dark, because the delegation has been pulled from the TLD.
Pending delete lasts about five days. The name is locked, and no renewal is possible at any price. Then it drops back into the public pool at a moment the registry sets. Drop-catching services and people running scripts race to register it within seconds. Some want the name for resale. Others want the leftover traffic from old links and old email.
That last part is the one that bites. Your old mail still points at the name. Any service that sends password reset links to an address on the domain now sends them to whoever registered it. Chapter 13 makes the same point from the email side: losing the domain can mean losing your inbox, and your inbox is where password resets go.
Why the stages exist: a registry that deleted a name the moment a card bounced would be unkind to forgetful people, and a name released in one second would cause chaos of its own. The stages give time to notice, a price that climbs to discourage forgetting, and a clear end.
The best way for a small production setup is boring on purpose. Turn on auto-renew, keep a card on the registrar that will still be valid next year, set calendar reminders at 60 and 15 days before expiry, and make sure the registrant contact is an address you actually read. Then add a monitor that checks the expiry date for you. Chapter 19 covers monitoring properly.
Premium renewals are the sneaky one. Some newer TLDs, and some names inside them, are cheap to buy and expensive to keep. The first year is a promotional price and the renewal is a premium one. Read the renewal price before you buy, not in the month it bites.
DNSSEC: signing the directory
Section titled “DNSSEC: signing the directory”Think of the city directory as a list you trust only if it is true. Suppose someone pins a forged card for your shop on the board outside the directory office. Every visitor who reads it walks to the wrong door, and nothing on the card says it is fake.
That is the danger behind DNS cache poisoning. A resolver asks a question, an attacker races a forged answer back, and the forgery gets cached for everyone who asks next. Dan Kaminsky showed in 2008 that the old defences were weaker than people hoped, and a widely told story says the industry scrambled for a quick patch. The patch was randomised source ports, which made the race harder. The lasting fix is DNSSEC.
DNSSEC does not hide anything. It signs the answers, and the pieces are:
- The zone owner generates a key pair and publishes the public half as a DNSKEY record.
- Each set of records, such as your www address record, gets an RRSIG record, a signature made with the private key.
- The parent zone, here
.in, publishes a DS record, which is a hash of your DNSKEY. The parent is vouching for your key. - The root key is the one thing a resolver trusts without proof. Resolvers ship with it as a trust anchor, and it has been replaced once, in the late 2010s, through a public ceremony.
A validating resolver walks the chain from the root down. The root vouches for the registry, the registry vouches for your key through the DS, and your key signs the answer. Break any link and the resolver refuses the answer instead of guessing.
What DNSSEC protects is integrity and authenticity. The answer really came from the zone owner, and nobody altered it on the wire. What it does not do is encrypt. Your queries still travel in the open, which is a job for encrypted DNS transports, not for DNSSEC. It also does not protect availability, and this is where it bites. Signatures have a validity window. If the signing stops and your RRSIGs expire, validating resolvers return an error, and your site goes dark for everyone who validates, even though the server is fine. Alarm on signature expiry, not only on the server being up.
Adoption is patchy for a plain reason. A signed zone needs three things to stay in step: the signing keys, a DS record at the parent that matches them, and a registrar that accepts DS uploads. Key rollovers are the delicate part, because one mistake makes a healthy domain look dead to validators. A large share of domains are still unsigned, so the benefit is real but uneven.
For a small production VPS, my advice is short. Turn DNSSEC on if your DNS host offers it in one click, confirm the DS record has reached your registrar, and treat a DNS move as a DNSSEC event. Chapter 17 walks the nameserver move in practice.
The lab: find out who vouches for your name
Section titled “The lab: find out who vouches for your name”Your goal is to map the whole cast for one domain using read-only lookups, so every role from the earlier sections shows up in a real answer. Use a domain you own. If you do not own one, a large public site will do for the read-only steps.
Work through these steps in order:
- Ask the registry for the registration record in RDAP form, not classic WHOIS. Note the registrar, the status codes, the expiry date and the nameservers it lists.
- Ask the public internet which servers answer for the name. Compare them with the nameservers the registry listed. If they are run by a different company from the registrar, you have found the registrar and the DNS host as two separate roles.
- Ask the parent zone for your delegation and your DS record. If there is no DS, your zone is unsigned. Say so out loud, because that is a real finding.
- Trace the path from the root down to your address record, one hop at a time. For each hop, write down which organisation answered.
- Optional, on a throwaway domain only: change its nameservers at the registrar to another DNS host, then watch the parent’s view change over the next hour or so. Notice how long the old answers linger, and why the TTL on the delegation decides the wait.
You will know it worked when you can name, for your domain, the registrar, the registry, the DNS host, the expiry date and whether DNSSEC is on. You should also be able to say in one sentence what the DS record is for, and why a nameserver change takes time to show up everywhere.
What you now know
Section titled “What you now know”- A domain is a name you rent through a chain of offices. ICANN writes the rules, a registry runs each TLD, a registrar sells you the name, and a DNS host publishes the directory entry.
- Changing nameservers changes who answers for your name. It does not change who owns it.
- Your registrar login is the real front door. Whoever controls it can move the domain, change its nameservers and reset the email that resets everything else.
- Expiry is a lifecycle, not a cliff: grace, then redemption at a painful price, then pending delete, then drop. Once a name drops, strangers get a shot at it.
- Registrar lock and transfer codes slow a thief down. Two-factor authentication keeps most of them out in the first place.
- DNSSEC signs the directory so resolvers can check answers. It protects integrity, not privacy, and when a signature or DS record goes stale, validating resolvers take your site offline.
Self-quiz
Section titled “Self-quiz”1. A friend says “I bought my .in name from NIXI”. Is that quite right, and who do you call about a failed renewal?
Half right. NIXI runs the .in registry, the district land office for that TLD, but you almost certainly bought through a registrar, which is the property agent. A failed renewal is usually a registrar or card problem, so start there.
2. You point your nameservers at Cloudflare. What changed, and what stayed the same?
The delegation at the parent (the TLD) now lists Cloudflare’s nameservers, so Cloudflare answers for your zone. Ownership, the registrar account and the expiry date stayed exactly where they were.
3. Why is 2FA on the registrar more important than a strong password on your DNS host?
The registrar can change the nameservers, the contact details and the transfer status of the domain itself. Whoever gets into that account can bypass the DNS host entirely and point your traffic, and your email, wherever they like.
4. What is the difference between redemption and pending delete?
Redemption is a recovery window, roughly 30 days, where the original owner can still get the name back at a steep fee. Pending delete is a short final stage, about 5 days, after which the name is released. Both durations vary by registry, so check the rules for your TLD.
5. Why can a cheap first-year domain be expensive to renew?
Registrars often run promotional first-year prices. Some names are marked premium by the registry, and their renewal price reflects that. Read the renewal price before you buy, not after.
6. DNSSEC is switched on, and then the signatures expire. What do visitors see, and why?
Validating resolvers refuse answers they cannot verify, so they return a failure rather than your site. The site goes offline even though the servers are fine. Careful signing operations are the whole game here.
Exercises
Section titled “Exercises”Warm-up 1. Name the cast. Pick any domain you use and name the ICANN, registry, registrar, registrant and DNS host for it.
Answer
Model: ICANN sets the rules. The registry runs the TLD (Verisign for .com, NIXI for .in). The registrar is where you bought it. You are the registrant on paper. The DNS host is whoever publishes the records. Any two of these can be the same company, but they do not have to be.
Warm-up 2. What the lock stops. In two sentences, say what registrar lock prevents and what it does not.
Answer
Model: It stops a transfer to another registrar without an unlock step. It does not stop a compromised account from changing nameservers or contacts, which is why 2FA matters too.
Warm-up 3. Read the clock. Put these in order after a renewal is missed: drop, pending delete, redemption, grace, expiry.
Answer
Model: Expiry, grace, redemption, pending delete, drop. Grace is short (roughly 0 to 45 days depending on the registrar), redemption is costly, and pending delete is brief.
Lab 4. Audit your registrar. Check the registrar account for 2FA, registrar lock, auto-renew with a valid card, a contact email on a different domain, and the expiry date.
Hint and model solution
Hint: Log in to the registrar and look under security, domain lock and renewal settings. Compare the contact email’s domain with the domain you are protecting. Model solution: a short list with each item marked fine or fix. A contact email on the same domain is a single point of failure, because losing the domain also loses the reset path.
Lab 5. Ask RDAP. Look up a .com you know with RDAP and note its registrar, expiry date and nameservers. Notice which contact fields are redacted.
Hint and model solution
Hint: Run curl -s https://rdap.org/domain/example.com (or swap in a .com you know) and look for the events and nameservers sections. Model solution: you should see a registrar name, an expiration event and the nameserver list. Personal contact fields are often redacted, and that redaction is the privacy part of WHOIS.
Lab 6. Ask the TLD who delegated you. Compare the nameservers your registrar panel shows with the ones the parent publishes for your domain.
Hint and model solution
Hint: Run dig NS example.com +short and compare the output with the nameserver section of your registrar panel. Model solution: the two lists should match. If they do not, the delegation at the parent has not caught up with your panel change, and answers may still come from the old DNS host.
Lab 7. Find the DS record. On a DNSSEC-signed domain you know, find the DS record at the parent and follow the chain from the root with a trace.
Hint and model solution
Hint: Run dig DS example.com +short and dig +trace www.example.com on a signed domain. Model solution: the DS record at the parent is a hash of a DNSKEY in your zone. If the trace shows no DS at the parent, the domain is unsigned there, and DNSSEC cannot validate it no matter what the zone says.
Staff 8. Plan a registrar move. You need to move a domain and its DNS to new providers with no downtime and no lost email. Write the order of steps.
Model answer
Copy every record first, including MX, the SPF, DKIM and DMARC TXT records, and any site-verification entries. Lower TTLs ahead of time. If the domain is signed, remove the DS record at the parent and wait out its TTL before changing nameservers, or validating resolvers will fail. Then unlock, get the transfer code, transfer, and confirm the nameservers and mail. Set 2FA and a separate recovery email on the new account before you finish.
Staff 9. Harden against the hijack. A crypto site lost its nameservers to someone who got into the registrar account. Name three controls that would have made that much harder, and say what each one stops.
Model answer
Hardware-key 2FA on the registrar login, so a stolen password is not enough. A registrar lock that blocks transfers and needs an unlock step for sensitive changes, where the registrar supports it. A recovery email on a domain the attacker does not control, so the reset path cannot be taken over. Alerts on nameserver and contact changes, plus the same 2FA on the DNS host, close the remaining gaps.
Book 2 of a series. Book 1: The Glue.