๐ Domain Management
Point a custom domain to your Web3 app and manage DNS and SSL so users get a professional, secure URL.
Whether your app is on Vercelย , Netlifyย , Cloudflare Pagesย , or another host, the same concepts apply: DNS records and HTTPS.
๐ฏ Why Custom Domains Matter
- Trust โ
app.yourproject.iolooks more professional thanrandom-name-123.vercel.app - Branding โ Same name across marketing, docs, and app
- Stability โ Change hosting without changing the URL users know
- SEO and links โ One canonical URL to share and index
๐ Core Concepts
| Term | Meaning |
|---|---|
| Domain | Human-readable name (e.g. yourproject.io) |
| DNS | System that maps domain names to IPs and other records |
| A record | Points a domain to an IPv4 address |
| CNAME | Points a subdomain to another hostname (e.g. app โ cname.vercel-dns.com) |
| TXT record | Used for verification and sometimes routing (e.g. Vercelย ) |
| SSL/TLS | Encrypted HTTPS; usually via Letโs Encryptย or the hostโs certificate |
๐ ๏ธ Where to Buy and Manage Domains
- Cloudflare Registrar โ At-cost pricing, DNS and proxy in one place
- Namecheap โ Popular, good support
- Google Domains (now Squarespace) โ Simple UI
- Porkbun โ Low prices, straightforward DNS
- Vercel Domains โ Buy and attach in one flow if you deploy on Vercel
You can buy the domain at one place and manage DNS at another (e.g. buy at Namecheap, use Cloudflare DNSย for free).
๐ Adding a Custom Domain (High Level)
- Buy the domain (or use one you already own).
- Add the domain in your host (Vercel, Netlify, etc.); theyโll show required DNS records.
- Create DNS records at your registrar or DNS provider (see below).
- Wait for propagation (minutes to 48 hours; often under 15 minutes).
- Enable HTTPS โ Most hosts do this automatically once DNS is correct.
๐ง DNS Records: What to Add
Hosts tell you exactly which records to create. Typical patterns:
Vercel
- Add a domainย in Project โ Settings โ Domains.
- For root
yourproject.iothey often ask for:- A
76.76.21.21(or the IP they show)
- A
- For www or app they usually ask for:
- CNAME
www(orapp) โcname.vercel-dns.com
- CNAME
Example (conceptual; use the values Vercel shows):
# At your DNS provider (e.g. Cloudflare, Namecheap)
Type Name Value TTL
---- ---- ----- ---
A @ 76.76.21.21 3600
CNAME www cname.vercel-dns.com 3600Netlify
- Add custom domainย in Domain settings.
- Netlify gives you a target like
your-site.netlify.app. Typical:- CNAME
wwwโyour-site.netlify.app - For apex they may use ANAME/ALIAS or A to their load balancer; follow their UI.
- CNAME
Cloudflare Pages
- Custom domainsย โ If the domain is on Cloudflare, add it in the Pages project; CNAME or A/AAAA as shown.
Generic (any host)
If your host gives you an IP:
Type Name Value TTL
---- ---- ----- ---
A @ 203.0.113.10 3600
A www 203.0.113.10 3600If they give you a hostname:
Type Name Value
---- ---- -----
CNAME www your-app.fly.dev๐ SSL/HTTPS
- Vercel / Netlify / Cloudflare Pages โ Provision certificates automatically once DNS points to them.
- Custom server โ Use Letโs Encryptย with Certbotย or your hostโs tooling.
- Cloudflare โ Can proxy traffic and terminate SSL; enable โFull (strict)โ if you use their SSL.
No code change is required for basic HTTPS; itโs configured at the host/DNS level.
๐ Example: Cloudflare DNS (Web UI)
- Log in at dash.cloudflare.comย .
- Select the zone (your domain).
- Go to DNS โ Records.
- Add record:
- Type: CNAME
- Name:
app(forapp.yourproject.io) - Target:
cname.vercel-dns.com(or the value from your host) - Proxy status: Proxied (orange cloud) or DNS only (grey), as you prefer.
- Save. Propagation is usually quick.
๐ฅ๏ธ Example: CLI (Cloudflare)
If you use Cloudflare APIย or Wranglerย , you can add records via CLI:
# Create CNAME for app.yourproject.io โ Vercel
# (Replace ZONE_ID and values with yours)
curl -X POST "https://api.cloudflare.com/client/v4/zones/ZONE_ID/dns_records" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"type": "CNAME",
"name": "app",
"content": "cname.vercel-dns.com",
"ttl": 3600,
"proxied": false
}'โ Checklist
- Domain bought and DNS accessible (registrar or Cloudflare)
- Domain added in hosting dashboard (Vercel/Netlify/Pages)
- A and/or CNAME records created as instructed
- Propagation waited (check with whatsmydns.netย )
- HTTPS working (host usually does this automatically)
- Optional: Environment variables for app URL if needed
๐ Further Reading
- Vercel: Custom Domainsย
- Netlify: Custom domains & HTTPSย
- Cloudflare DNSย
- Letโs Encryptย
- Whatโs My DNSย โ Check DNS propagation
Last updated on