Blog

CNAME or Redirect?

Should I Use a CNAME record or Redirect?

The Easy Answer

If you want to:

  • Migrate an existing set of links from one subdomain to another.
  • Migrate a blog or subdomain to the root domain.
  • Migrate from one domain to another.

You should use a redirect.

HTTP Redirection Record

Specifically, an HTTP redirection record. You can use this type of record to divert traffic to another FQDN (Fully Qualified Domain Name) outside of your domain’s zone. You can also use them to migrate links from subdomains within your own zone.

Side note: if you want to learn all about how HTTP redirects work and the nitty-gritty details of HTTPS redirection, check out this blog.

When to Use CNAME Record:

CNAME records should not be confused with redirects. CNAME records are actually “aliases” that map a hostname to another hostname, and they have to be within the same FQDN.

You could use a CNAME record to move traffic from www.yourdomain.com to yourdomain.com. If a user has anything added to the URL path (like www.yourdomain.com/something) the path will not be carried over.

What are HTTP Redirects Used For?

Now that you get the difference between the two, let’s dig deeper in HTTP redirects and when you would use them.

1. HTTP redirects are better for SEO

HTTP redirects are commonly used to migrate pages from a subdomain to a root domain. This has become a common SEO (Search Engine Optimization) practice to improve search rankings for blogs.

If you’ve ever managed a company blog, you’ve likely come across the debate of “subdomain vs subfolder”... as in the destination for the blog.

As in,

“Does blog.mycompany.com get better rankings in search results than mycompany.com/blog?”

It depends…

Google has publicly stated that it ranks both types of websites equally. So perhaps the argument is null and void?

Not quite. Further research shows that hosting your blog (or any content) on a separate subdomain will deliver different results. Since search engines deem subdomains as completely separate entities from their root domain, the link building efforts you use on your root domain could have little to no impact on your subdomain… and vice versa.

This discovery has led to more and more organizations hosting their blogs on their root domain in subfolders. And they use HTTP redirects to safely migrate link equity to the root domain.

2. HTTP Redirecton to Migrate Links

Did you recently change your domain? Go through a massive rebranding? Get acquired… what have you… you can use an HTTP (or HTTPS) redirect to retain all of your existing content and migrate it to a new FQDN.

HTTP redirects preserve your existing URL paths and simply prefix them with a new FQDN, like so:

Original URL:

mydomain.com/blog/article

Will redirect to:

acquired.com/blog/article

An HTTP redirect will preserve your existing link building efforts and use 301 (permanent redirects) to transfer your link equity to the new domain.

3. Subdomain Forwarding

Same exact thing we’ve been talking about, just with a different name. You can use HTTP redirection records to “forward” traffic from one subdomain to another.

Do you have a use case we didn’t talk about yet? Or would you like to see more of this kind of content? Let me know in the comments :)

For more information visit Constellix

DNS Made Easy Team
The DNS Made Easy Team are industry experts passionate about DNS, cybersecurity, and network optimization. With decades of combined experience, they provide in-depth insights, best practices, and technical guidance to help businesses enhance performance, security, and reliability in the ever-evolving digital landscape. Stay informed with expert-driven content!

Our latest news

Stay up to date on the latest DNS Made Easy resources and news

Want a Proof of Concept?

Start Free Trial