Blog

/

Domains & DNS

A record or CNAME: which should point at your redirect?

·

7

min

·

Dial diagram of DNS resolution from the root through .com to example.com, ending in an A record

When you connect a domain to a redirect service, you’re usually asked to add two kinds of DNS records: A records for the domain itself and a CNAME for www.

It can feel like one of them would be enough. It isn’t, and the reason is a small DNS rule that catches a lot of people out.

What an A record does

An A record maps a hostname directly to an IPv4 address:

example.com → 188.114.96.9

When a browser looks up example.com, DNS answers with that address, and the browser connects to it.

What a CNAME does

A CNAME record maps a hostname to another hostname instead of an address:

www.example.com → proxy.redirect.supply

The browser then looks up proxy.redirect.supply to find the address. The advantage is that the provider can change its addresses without you updating your DNS.

Why the bare domain can’t use a CNAME

The bare domain, also called the apex domain, like example.com, already has other records that must exist there, such as NS and SOA records. DNS rules don’t allow a CNAME to sit alongside other records for the same name.

So for the apex, you use A records. For subdomains like www, a CNAME works fine.

Some DNS providers offer a workaround called ALIAS, ANAME or CNAME flattening. It behaves like a CNAME at the apex but returns A records to the browser. If your provider has it, it’s fine to use, but A records work everywhere.

What Redirect Supply asks for

For a root domain, the DNS records reference lists:

  • @ A 188.114.96.9

  • @ A 188.114.97.9

  • www CNAME proxy.redirect.supply

  • _cf-custom-hostname TXT with a value from your dashboard

Two A records give you redundancy. The TXT record verifies that you control the domain before a certificate is issued.

For a subdomain, like shop.example.com, you don’t need the A records. The CNAME handles the routing.

The mistake that breaks redirects: leftovers

The most common problem isn’t choosing the wrong type. It’s leaving the old records in place.

If example.com still has an A record pointing to your old host next to the new ones, DNS hands out both. Some visitors reach the redirect, others reach the old server. The redirect then works “sometimes”, which is the hardest kind of bug to spot.

Before adding new records, remove for the same host:

  • old A and AAAA records

  • old CNAME records for www

  • registrar forwarding or URL redirect records

Leave MX records and other TXT records alone. Those handle email and verification, not your website. Our record conflicts guide shows what to look for.

What about AAAA records?

An AAAA record is the IPv6 version of an A record. If your domain has an old AAAA record pointing to your previous host, some visitors on IPv6 networks will still reach the old server.

If your redirect service doesn’t ask for AAAA records, remove the old ones. Leaving them in place is a common reason a redirect works on one network and not another.

Does TTL matter?

TTL, or time to live, tells resolvers how long to cache a record. A lower TTL means changes spread faster. For a redirect, your provider’s default is usually fine. If you’re planning a move, lowering the TTL a day in advance can shorten the switch-over.

How to check your records

After saving, use our DNS lookup to see what the domain returns right now. Then use the DNS checker to see whether resolvers around the world have picked up the change.

If both the A records and the www CNAME show the new values, the domain is ready. In Redirect Supply, its status changes from Pending to Connected automatically.

Ready to keep every link alive?

Ready to keep every link alive?

Ready to keep every link alive?