edgely
Back to Blog
Education
6 min readUpdated June 1, 2025

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 TypePoints ToWhen to Use
AIP address (e.g. 1.2.3.4)Apex domain, known static IP
CNAMEAnother hostnameSubdomains, services with dynamic IPs
ALIAS / ANAMEAnother hostname (at apex)Apex domain when CNAME not allowed

Adding a CNAME at Major Registrars

Namecheap

  1. Log in → Domain List → click Manage next to your domain.
  2. Go to Advanced DNS tab.
  3. Click Add New Record → choose CNAME Record.
  4. Host: www | Value: proxy.xedgely.com | TTL: Auto.
  5. Click the green checkmark to save.

GoDaddy

  1. Log in → My Products → find your domain → click DNS.
  2. Click Add → Type: CNAME.
  3. Name: www | Value: proxy.xedgely.com | TTL: 1 Hour.
  4. Click Save.

Cloudflare

  1. Log in → select your domain → go to DNS → Records.
  2. Click Add record.
  3. Type: CNAME | Name: www | Target: proxy.xedgely.com.
  4. Toggle proxy status to DNS only (grey cloud) unless you want Cloudflare's proxy layer too.
  5. Click Save.

Google Domains / Squarespace DNS

  1. Log in → select your domain → DNS tab.
  2. Under Custom Records, click Manage custom records.
  3. Add: Type CNAME | Host: www | Data: proxy.xedgely.com.
  4. 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 www at 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. [1]CNAME Record (Cloudflare DNS Learning)cloudflare.com
  2. [2]DNS Propagation Explainedcloudflare.com
  3. [3]RFC 1912 — Common DNS Operational and Configuration Errorsrfc-editor.org
  4. [4]Cloudflare CNAME Flatteningdevelopers.cloudflare.com

Ready to add your custom domain?

Set up your reverse proxy in under 5 minutes — free, with SSL and edge caching included.

#cname#dns#domain#registrar#setup