Lesson 4 of 6
Custom domains
Buy a domain, point DNS at your host, and know why DNS takes a little time.
By the end: You can connect a domain to Vercel and understand basic DNS wait time.
your-app.vercel.app or your-app.netlify.app or your-app.fly.dev works for sharing with friends. For a real product, you want your own domain. Something like yourname.com or yourapp.io.
This lesson has two parts. First, you buy a domain. Second, you point it at your app. The waiting time between those two steps can feel strange the first time, so this lesson will tell you what is normal.
Buy a domain
Go to a domain registrar. Common ones are Namecheap, Cloudflare, and Porkbun. Prices are very similar. A .com domain costs around 10 to 15 USD per year. Less common endings like .io or .ai cost more.
Search for the domain you want. If it is available, add it to your cart and pay. If it is taken, try a variation or a different ending.
A few tips:
- Turn on privacy protection (often called WHOIS privacy). It is usually free. Without it, your home address ends up in a public database.
- Turn on two-factor authentication on your registrar account. Domains are one of the most valuable things you can own online and losing access to them is a long process to recover.
- Ignore upsells. You do not need hosting from your registrar. You do not need their email service. You do not need their SEO tool.
You now own a domain. It is not connected to anything yet.
Point your domain at Fly.io
Fly.io handles domains from the terminal.
- Tell Fly.io you want to use a custom domain:
fly certs add yourname.comFly.io responds with one or two DNS records you need to add. Copy them.
-
Go to your registrar (Namecheap, Cloudflare, wherever you bought the domain).
- Find the DNS settings for your domain. This is usually a tab called DNS, Advanced DNS, or Manage DNS.
- Add the records exactly as
flyctlshowed them. Name goes in the Name column. Value goes in the Value or Target column. Type matches (usuallyAfor the root,AAAAfor IPv6, orCNAME). - Save.
-
Wait. DNS changes do not happen instantly. They usually finish in 10 to 60 minutes. Sometimes they take a few hours. In rare cases, up to 48 hours. This is normal. The internet is slowly telling every computer everywhere that your domain now points at Fly.io.
-
Check the status:
fly certs show yourname.comWhen it says Configured and shows a valid certificate, your domain is live. Fly.io provisions HTTPS automatically.
Curious about other platforms?
On Vercel
Netlify uses the same pattern: add the domain in a dashboard, copy the DNS records it shows you, paste them into your registrar, wait for the internet to catch up. The buttons are labelled differently but the shape is identical.
Fly.io uses the terminal. You run fly certs add yourname.com, copy the DNS records it prints, add them at your registrar, then check status with fly certs show yourname.com. Same concept, different tool.
On Netlify
Vercel uses the same pattern: add the domain in a dashboard, copy the DNS records it shows you, paste them into your registrar, wait for the internet to catch up. The buttons are labelled differently but the shape is identical.
Fly.io uses the terminal. You run fly certs add yourname.com, copy the DNS records it prints, add them at your registrar, then check status with fly certs show yourname.com. Same concept, different tool.
Your progress saves in this browser only. Clearing site data will reset it.