Registering a Domain Name
A domain name is the human-friendly address people type to reach your server (like example.com instead of an IP address such as 203.0.113.10). Before you can point a domain at your Ubuntu server, you have to register it — that is, rent it from a company called a registrar. This page walks you through choosing a good registrar, what the price tags really mean, and how to avoid the traps that catch first-time buyers.
What a registrar actually is
A registrar is a company accredited by ICANN (the Internet Corporation for Assigned Names and Numbers — the non-profit that coordinates domain names globally) to sell and manage domain registrations. You never own a domain forever; you lease it, usually one year at a time, and you must renew it before it expires or you lose it.
When you register a domain you are really paying for three things bundled together:
- The registration itself (your right to use the name).
- DNS hosting (the service that stores your DNS records — the small table that maps your domain to your server’s IP address).
- Optional extras like WHOIS privacy and email forwarding.
Your domain is one of the few things you cannot get back easily if you lose it. Set auto-renew and keep a backup payment card on file. Expired domains are routinely snapped up by squatters within minutes.
Choosing a registrar
The big practical differences between registrars are renewal pricing, whether privacy is free, and how clean the dashboard is. Here is an honest comparison of the popular 2026 options for developers.
| Registrar | Typical .com first year | Typical .com renewal | Free WHOIS privacy | Notes |
|---|---|---|---|---|
| Cloudflare Registrar | At-cost (~$10.44) | At-cost (~$10.44) | Yes | Sells at wholesale, no markup; requires using Cloudflare DNS |
| Namecheap | ~$6-10 (promo) | ~$15-16 | Yes (lifetime) | Friendly UI, good support, frequent promos |
| Porkbun | ~$10 | ~$11 | Yes | Cheap renewals, supports many TLDs, API access |
| Google/Squarespace | ~$12 | ~$12-20 | Yes | Google sold its registrar to Squarespace in 2023 |
| GoDaddy | ~$1-12 (promo) | ~$20-22 | Paid add-on | Heavy upsells; avoid for renewals |
When to use Cloudflare: you want the cheapest possible renewals and you are happy to run your DNS on Cloudflare (which most DevOps engineers do anyway). When to use Namecheap or Porkbun: you want a self-contained registrar with its own DNS, easy transfers, and you register many domains. When NOT to use GoDaddy: when you care about renewal cost — the first year is cheap but renewals are among the highest.
The cheap-first-year trap
The single most common mistake is buying a .com for $0.99 or $1.00 in year one without checking the renewal price. Registrars advertise the promo price loudly and hide the renewal price in small text. A domain that costs $1 today might cost $22 every year after.
Always look at the renewal price, not the promo. The total cost of owning a domain for five years matters far more than the first-year discount.
Watch out for “free” domains bundled with hosting plans. They are usually locked to that host, expensive to renew, and a nightmare to transfer out. Always register your domain at an independent registrar you control.
WHOIS privacy
Every domain has a public WHOIS record — a directory entry listing the owner’s name, email, phone, and address. Without privacy, anyone can look this up, which means spam and scam calls. WHOIS privacy (also called domain privacy) replaces your personal details with the registrar’s proxy details.
Keep WHOIS privacy on for personal and small-business domains. It is free at Cloudflare, Namecheap, and Porkbun. The only time to turn it off is when a TLD’s rules forbid privacy, or when a business legally needs public contact details.
Registering step by step
Most registration happens in a web browser, but the verification afterward matters. Here is the flow.
- Search for the name and confirm availability in the registrar’s search box.
- Add it to the cart. Decline the upsells (hosting, “premium DNS”, email you do not need).
- Enable auto-renew and confirm WHOIS privacy is on.
- Pay for the longest term you are comfortable with (multi-year locks in price).
- Verify the email the registrar sends you within 15 days — this is mandatory.
ICANN requires you to verify the registrant email address. If you ignore the verification email, the registrar will suspend your domain and your site will go offline.
Once registered, you can confirm ownership and expiry from the command line on your Ubuntu server. Install the whois tool first.
sudo apt update
sudo apt install -y whois
whois example.com | grep -Ei 'registrar|expir|name server'
Output:
Registrar: Cloudflare, Inc.
Registrar URL: https://www.cloudflare.com
Registry Expiry Date: 2027-06-15T09:12:44Z
Name Server: ns1.cloudflare.com
Name Server: ns2.cloudflare.com
This tells you which registrar holds the domain, when it expires, and which nameservers (the DNS servers authoritative for your domain) are currently in charge. After registration, the nameservers point to your registrar by default; you change them when you move DNS elsewhere.
Verifying DNS resolution
Once your domain is live and you have added at least an A record, check that it resolves from your server using dig (a DNS lookup tool from the dnsutils package).
sudo apt install -y dnsutils
dig +short example.com A
Output:
203.0.113.10
If you see your server’s IP, the domain is working. If you see nothing, the DNS records have not been created or have not propagated yet (propagation can take minutes to a couple of hours).
Best practices
- Always compare the renewal price, not the first-year promo, before buying.
- Turn on auto-renew and keep a valid card on file so you never lose the domain.
- Keep WHOIS privacy enabled unless a TLD or legal requirement forbids it.
- Register at an independent registrar you control — never accept a host-bundled “free” domain.
- Verify the ICANN registrant email within 15 days or the domain gets suspended.
- Prefer registrars that sell at cost (Cloudflare) or with cheap renewals (Porkbun, Namecheap) for long-term value.
- Lock the domain (registrar lock / transfer lock) to prevent unauthorized transfers.