A domain is the most powerful piece of internet real estate you can own. It's a permanent address you control — and pointing it at a website, a server, or a home machine only takes a few DNS records. This site runs exactly this way.

Buying the domain

You buy a domain from a registrar — a company authorized to sell names in a top-level domain (TLD). Pick wisely:

TLD choice matters more than people think:

Watch out for renewal price: many domains are cheap the first year and jump afterward. Cloudflare avoids this by pricing renewals the same.

Understanding DNS records

A domain alone does nothing. You tell the world where it points using DNS records. The ones you'll actually use:

Type     Example                         Purpose
──────────────────────────────────────────────────────────
A        185.199.108.153                 IPv4 address
AAAA     2606:4700:4700::1111            IPv6 address
CNAME    velsrocky.github.io             alias to another name
MX       mail.yourdomain.com             email delivery
TXT      "v=spf1 ..."                    verification / security

A record names map a domain to an IP. CNAME maps a domain to another domain — handy for services that give you a name (like username.github.io).

Scenario A: GitHub Pages (this site)

To connect a domain to a free GitHub Pages site:

A        @      ->  185.199.108.153
A        @      ->  185.199.109.153
A        @      ->  185.199.110.153
A        @      ->  185.199.111.153
CNAME    www    ->  username.github.io
  1. Add those records at your DNS provider.
  2. In the GitHub repo: Settings → Pages → Custom domain → enter your domain.
  3. GitHub verifies the records and issues a free HTTPS certificate automatically.

Scenario B: a VPS or dedicated server

If you rent a server (Linode, DigitalOcean, Hetzner, a VPS), point your domain at its IP:

A        @   ->  203.0.113.10      (your server's IP)
CNAME    www ->  @                    (www follows the root)

Then configure your web server (Nginx, Apache, Caddy) to serve your site and set up HTTPS with a free Let's Encrypt certificate.

Scenario C: a home server

Home networking adds a layer — your house has one public IP, shared by every device via NAT. You need:

  1. Port forwarding — tell your router to send web traffic (port 443) to your server's private IP.
  2. A fixed public IP — home connections often change IPs. Use a DDNS service that updates a DNS record when your IP changes.
  3. HTTPS — Let's Encrypt can verify ownership via DNS records, so it works on home IPs too.
Security note: exposing a home server to the internet is real. Keep everything updated, use SSH keys, and consider Cloudflare's free proxy as an extra shield that hides your real IP.

Email and verification records

Want you@yourdomain.com? That needs MX records pointing at your mail provider (Gmail/Workspace, Zoho, or a custom mail server). Providers also ask for TXT records (SPF, DKIM) to prove your domain owns its mail.

Common gotchas

That's it

Own the name, add a few records, and your domain points anywhere you own. Whether it's free static hosting, a rented server, or a box in your closet — the DNS records are the glue, and you now know exactly how they work.