How to Set Up a CNAME Record for a Short Link Domain

By Alok · · 8 min read
How to Set Up a CNAME Record for a Short Link Domain

You want links like go.yourbrand.com/sale, and the shortener told you to "add a CNAME record." That is one line in your domain's DNS settings. This guide shows how to set up a CNAME record for a short link domain: what to type in each box, how the boxes differ at GoDaddy, Namecheap and Cloudflare, and how to fix it when the check keeps saying "waiting."

The short answer: create a record of type CNAME, put your subdomain (for example go) in the Host or Name field, and put the shortener's target in the Value field. For Freeurl, that target is cname.freeurl.net. Add the TXT record the dashboard gives you, save, then press Check DNS.

The rest of this post explains each part, so you can get it right the first time and know what went wrong if you don't.

A CNAME record says "this name is another name for that one." When someone opens go.yourbrand.com/sale, their browser asks DNS where go.yourbrand.com lives. The CNAME answers: go ask cname.freeurl.net. The request reaches Freeurl, which looks up /sale and sends the visitor to your real page.

Your main website is not touched. Only the one subdomain points to the shortener. That is why most people use a subdomain like go, link or get instead of their main domain.

A CNAME also beats typing in a server IP address. If the shortener ever moves servers, it updates its own name and your record keeps working. You never have to edit it again.

Before you start: three things to have ready

  • A domain you control. You need a login to the place where its DNS is managed. That is usually your registrar (GoDaddy, Namecheap, Squarespace Domains and similar) or Cloudflare if you moved DNS there.
  • The subdomain you want. Pick it now. Short and easy to say works best: go, link, try. It must not already be in use for something else.
  • The exact records from your shortener. In Freeurl, open Domains, press Add domain, and type the full name, such as go.yourbrand.com. The dashboard then shows the records for your case. Keep that tab open.

Not sure where your DNS lives? Look up your domain's NS (name server) records with a free lookup tool. If they end in something like cloudflare.com, you edit DNS at Cloudflare, even if you bought the domain somewhere else.

The two records Freeurl asks for

For a subdomain, Freeurl shows two records. Here is what they look like for go.yourbrand.com, as listed on the custom domain URL shortener page:

TypeHost / NameValue / Target
CNAMEgocname.freeurl.net
TXT_freeurl-verify.goA code generated for your account

The CNAME sends traffic to Freeurl. The TXT record proves you own the domain, so nobody else can claim it. You need both. Copy the TXT code from your dashboard rather than typing it, because one wrong character fails the check.

How to set up the CNAME record, step by step

The screens differ by provider, but every DNS panel asks for the same three things: type, host and value. Here is the general flow, then the quirks of the three most common providers.

  1. Sign in where your DNS is managed and open the DNS settings for your domain. It may be called DNS, Manage DNS, Advanced DNS or DNS Records.
  2. Check for an existing record with the same host (go). If one exists, delete or change it first. More on why below.
  3. Add a new record. Choose CNAME as the type.
  4. In Host or Name, enter only the subdomain part: go.
  5. In Value, Target or Points to, enter cname.freeurl.net.
  6. Leave TTL on the default or "Automatic."
  7. Save. Then add the TXT record the same way, with the host and code from your dashboard.
  8. Go back to Freeurl and press Check DNS.

GoDaddy

In your Domain Portfolio, pick the domain, then select DNS and Add New Record. GoDaddy's own CNAME help page says the Name field takes the prefix without the domain, such as blog or shop. So type go, not go.yourbrand.com. The default TTL is one hour, and GoDaddy says most changes take effect within an hour but can take up to 48 hours to reach everyone.

Namecheap

Go to Domain List, press Manage next to your domain, open the Advanced DNS tab and press Add New Record. Namecheap's guide to CNAME records notes that its system adds your domain name to the host automatically. Type go only. Remember to press Save All Changes, because the record is not live until you do.

Cloudflare

Open your domain, go to DNS > Records and press Add record. Set Type to CNAME, Name to go and Target to cname.freeurl.net. Then look at the Proxy status switch. Turn it off so the cloud icon is grey and it says DNS only.

This matters. With the proxy on (orange cloud), Cloudflare answers with its own addresses instead of showing your CNAME. Freeurl cannot see that the name points to it, so the check fails. Keep it on DNS only, at least until the domain is verified.

A worked example

Say you run a small candle shop with the website emberandwick.com, hosted on Squarespace. You want printed cards that say go.emberandwick.com/fall.

  • You leave the root domain alone, because your shop lives there.
  • In Freeurl you add go.emberandwick.com. The dashboard shows a CNAME (go → cname.freeurl.net) and a TXT record (_freeurl-verify.go with a code).
  • Your domain's DNS is at GoDaddy. You add both records there, typing only go and _freeurl-verify.go in the Name fields.
  • Twenty minutes later you press Check DNS. The domain turns green and gets an HTTPS certificate.
  • You create a link with the slug fall that points to your autumn collection page. You can tag it first with the UTM builder so the visits show up as "print" in your analytics.

Your website kept working the whole time, because only go changed.

How do you check that the CNAME is working?

You don't have to guess. Use a lookup tool to see what the internet sees.

  • In the browser: open Google Admin Toolbox Dig, type go.yourbrand.com, choose CNAME and run it. You should see cname.freeurl.net in the answer.
  • On a Mac or Linux terminal: run dig go.yourbrand.com CNAME +short. The output should be cname.freeurl.net. (the trailing dot is normal).
  • On Windows: run nslookup -type=CNAME go.yourbrand.com and look for the same name.

Check the TXT record the same way, using the full TXT host, for example _freeurl-verify.go.yourbrand.com with type TXT.

If the lookup shows the right value but Freeurl still says "waiting," give it a little time. Freeurl keeps checking, so you can close the page and come back.

Why won't my CNAME record verify?

Nearly every failed setup comes down to one of these.

The domain got added twice

If you type go.yourbrand.com into a host field that adds the domain for you, the real record becomes go.yourbrand.com.yourbrand.com. A lookup on go.yourbrand.com then finds nothing. Fix: edit the host so it says only go. The same applies to the TXT host.

Another record already uses that name

DNS rules say a CNAME must be the only record at its name. RFC 1912, the long-standing guide to common DNS mistakes, states this directly. So if go already has an A record, a TXT record, a URL redirect or an old CNAME, the new one is refused or ignored. Delete the old record first.

This is also why Freeurl puts its TXT record on a different name (_freeurl-verify.go) instead of on go itself. The two never collide.

You tried a CNAME on the root domain

The root of a domain (yourbrand.com, often shown as @) always holds other records, such as the name server records. That means a plain CNAME is not allowed there. GoDaddy's form won't even accept @ as a CNAME name.

If you want to use a whole domain for short links, such as a separate short domain like yourbrand.link, Freeurl gives you an A record for the root instead. Some providers offer a workaround: Cloudflare's CNAME flattening lets you enter a CNAME at the root and answers with an IP address behind the scenes. Use the record type your dashboard shows unless you know your provider handles this well.

One honest warning: if your main website lives on the root domain, do not point the root to any shortener. Your site would stop loading. Use a subdomain.

The Cloudflare proxy is on

Covered above, but it is the most common Cloudflare cause. Switch the record to grey cloud, DNS only.

A typo in the target

Look closely at the value. cname.freeurl.net, not freeurl.net, not https://cname.freeurl.net. A DNS target is a hostname, never a web address with https:// or a slash.

It just needs more time

DNS answers are cached for as long as the record's TTL says. Most new records show up within minutes to an hour. If you edited a record that already existed, old answers may hang around until the old TTL runs out.

What happens after the domain turns green?

Once both records are found, Freeurl sets up a free HTTPS certificate for the domain. After that, your branded domain appears in the domain list when you create a link. You can also make it your default, so every new link uses it.

A free account can connect up to 3 domains. If you print links on packaging or flyers, a branded domain pairs well with the QR code generator, since the code and the printed text then point to the same address on your own name.

Is a CNAME setup ever the wrong choice?

Sometimes, yes. A branded domain is worth it when you share links often, print them, or want people to trust them at a glance. Our post on whether short links are safe explains why people hesitate over unknown short domains.

It is less useful if you share a handful of links a year, or if you don't have access to your company's DNS and getting it would take weeks of back and forth with IT. In that case, start with regular short links and add the domain later. Links you already shared won't move, so make the switch before a big campaign, not in the middle of one.

Also keep in mind that the domain is now part of your link setup. If the domain expires, every link on it stops working. Turn on auto-renew at your registrar.

For the bigger picture, including how to choose between a subdomain and a separate short domain, read how to use your own domain for short links. When you are ready, you can connect your domain to Freeurl for free.

Frequently asked questions

Can I use a CNAME record on my root domain for short links?

Not a standard one. DNS rules do not allow a CNAME at the root of a domain, because the root already holds other records. For a root domain, Freeurl gives you an A record instead. Some DNS providers, such as Cloudflare, offer CNAME flattening as a workaround.

How long does a CNAME record take to work?

Usually a few minutes to an hour. GoDaddy says most changes take effect within an hour but can take up to 48 hours to update everywhere. Freeurl keeps checking, so you can leave the page and come back.

Should I type the full domain in the Host field?

Usually no. GoDaddy, Namecheap and Cloudflare all want only the subdomain part, such as go. Typing go.yourbrand.com can create go.yourbrand.com.yourbrand.com, which will not verify.

Why does Cloudflare need the record set to DNS only?

With the proxy on, Cloudflare answers with its own addresses and hides the CNAME, so the shortener cannot see that your subdomain points to it. Set the record to DNS only (grey cloud) so verification can find it.

Sources

Alok

We build free tools for short links, QR codes and link tracking, and write down what we learn along the way. About us

Try it on your own links

Shorten a link in seconds and see who clicks it. Free, no credit card.

Shorten a link