How to Set Up a CNAME Record for Your Custom Domain (Step-by-Step)
CNAME records are the foundation of custom domain proxying. This guide walks through adding a CNAME at every major DNS registrar — Namecheap, GoDaddy, Cloudflare, and more.
TL;DR — Quick Answer
A CNAME record maps your subdomain (e.g. www.yourdomain.com) to a hostname (e.g. proxy.xedgely.com). Log in to your DNS registrar, add a CNAME record with the host "www" and value "proxy.xedgely.com", then save — propagation takes 1–24 hours.
What Is a CNAME Record?
A CNAME (Canonical Name) record maps one domain name (an alias) to another domain name (the canonical name). [1] For example:
www.yourdomain.com CNAME proxy.xedgely.com
When a browser resolves www.yourdomain.com, the DNS system follows the CNAME chain to proxy.xedgely.com, then resolves that to an IP address.
CNAME vs A Record
| Record Type | Points To | When to Use |
|---|---|---|
| A | IP address (e.g. 1.2.3.4) | Apex domain, known static IP |
| CNAME | Another hostname | Subdomains, services with dynamic IPs |
| ALIAS / ANAME | Another hostname (at apex) | Apex domain when CNAME not allowed |
Adding a CNAME at Major Registrars
Namecheap
- Log in → Domain List → click Manage next to your domain.
- Go to Advanced DNS tab.
- Click Add New Record → choose CNAME Record.
- Host:
www| Value:proxy.xedgely.com| TTL: Auto. - Click the green checkmark to save.
GoDaddy
- Log in → My Products → find your domain → click DNS.
- Click Add → Type: CNAME.
- Name:
www| Value:proxy.xedgely.com| TTL: 1 Hour. - Click Save.
Cloudflare
- Log in → select your domain → go to DNS → Records.
- Click Add record.
- Type: CNAME | Name:
www| Target:proxy.xedgely.com. - Toggle proxy status to DNS only (grey cloud) unless you want Cloudflare's proxy layer too.
- Click Save.
Google Domains / Squarespace DNS
- Log in → select your domain → DNS tab.
- Under Custom Records, click Manage custom records.
- Add: Type
CNAME| Host:www| Data:proxy.xedgely.com. - Save.
DNS Propagation
DNS changes don't take effect instantly. They propagate across the global DNS system, which can take anywhere from a few minutes to 48 hours depending on your registrar and the previous TTL. [2]
Monitor propagation at dnschecker.org — it shows whether your CNAME has resolved across dozens of DNS servers worldwide.
Why You Can't Use CNAME on the Apex Domain
RFC 1912 prohibits placing a CNAME on the zone apex (yourdomain.com without a subdomain) because it conflicts with SOA and NS records. [3] Solutions:
- Cloudflare CNAME Flattening: Cloudflare resolves the CNAME at query time and returns an A record, making it safe at the apex. [4]
- Redirect: Set up an HTTP redirect from the apex to
wwwat your registrar. - ALIAS/ANAME records: Some providers (Dyn, DNSimple) support non-standard ALIAS records that behave like CNAME at the apex.
Edgely is the fastest way to proxy your your site project to a custom domain. It provisions a free SSL certificate, syncs routing to Vercel Edge Config for sub-millisecond lookups, and optionally caches responses at the edge — all for free on the starter plan.
Key Takeaways
- A CNAME record maps your subdomain to another hostname (like proxy.xedgely.com).
- You cannot use a CNAME on the apex domain — use Cloudflare CNAME Flattening or a redirect.
- DNS propagation takes minutes to 24 hours depending on TTL.
- Monitor propagation at dnschecker.org to confirm your CNAME is live worldwide.
Frequently Asked Questions
How long does a CNAME take to propagate?
Most CNAME changes propagate within 5–30 minutes when using a low TTL (e.g. 300 seconds). If the previous TTL was high (e.g. 86400 = 24 hours), propagation can take up to 24 hours.
Can I use a CNAME on the root/apex domain?
Not with standard DNS. The apex domain requires an A record or AAAA record per RFC 1912. Use Cloudflare CNAME Flattening, an ALIAS record, or set up a redirect from apex to www instead.
What is TTL in DNS?
TTL (Time to Live) tells resolvers how long to cache a DNS record before checking again. Low TTL (300 seconds) means changes propagate faster but generate more DNS queries. High TTL (86400 seconds) is more efficient for stable records.
What does a CNAME chain look like?
A CNAME chain: www.yourdomain.com → proxy.xedgely.com → [Edgely IP]. Each step resolves until an A record returns an IP. Browsers follow the chain automatically.
Sources & Citations
- [1]CNAME Record (Cloudflare DNS Learning)— cloudflare.com
- [2]DNS Propagation Explained— cloudflare.com
- [3]RFC 1912 — Common DNS Operational and Configuration Errors— rfc-editor.org
- [4]Cloudflare CNAME Flattening— developers.cloudflare.com
Ready to add your custom domain?
Set up your reverse proxy in under 5 minutes — free, with SSL and edge caching included.