In this KB article we’ll address a common question we receive about the difference between a CNAME and a Web Redirect (also referred to as a URL redirect). Both serve entirely unique purposes, so it is important to understand the differences so you know which to use at the right time.
First about CNAME records
A CNAME record is a standard DNS resource record supported by all RFC compliant DNS servers. CNAME is an abbreviation for Canonical Name record, and it is essentially an alias for another domain. All information, such as IP Addresses, TTL, etc., are defined by the FQDN (fully qualified domain name) it points to. And, the alias doesn’t even have to be in the same domain.
This is quite handy if you run multiple services from a single IP address. For example, if you’re a small business and you have one server behind IP 220.127.116.11 that runs different services under your domain “example.com”, you could make an ‘A’ record for example.com point to 18.104.22.168, but then create CNAME records for everything else such as www, ftp, mail etc. and point them to example.com. This serves two purposes. 1) it makes it real easy if the IP changes, you only have to make one ‘A’ record edit, and; 2) it makes it easy to move things later (such as your mail host name) to another server without having to make changes in mail clients all over the place. For example, just change the CNAME for mail.example.com to an A record with the new IP or even to another alias like a third-party mail service provider.
Another benefit of a CNAME is that since it is an alias, it also masks. A common use for a CNAME is with a CDN. For example, www.example.com might point to customer-1234.example-CDN-company.net. This gives the CDN company complete control over DNS, allowing them to change the IP at will or do GEO DNS etc., but it hides all of that from the end-user because when you put www.example.com in the browser, it continues to show www.example.com.
So what is a Web Redirect then?
A Web Redirect allows you to transform the URL the user enters into the address bar and send them to a completely different destination. For example, someone typing www.example.com can be redirected to http://another-example-url-here.com/page.php. See the difference? A CNAME can’t do this because it doesn’t support directories or pages, like /page.php at the end of the URL.
Another benefit of using our web-redirect is that you can send a user to a URL that starts with https. You can also make the URL contain other elements like directories, query strings and the like, so it is quite versatile. The only thing a web redirect does not do is mask the original domain, such as www.example.com. This is because it is not an alias, it is a true redirect.
Our web redirect is not a standard DNS record type, it is a custom feature we created for our customers due to popular request. It works behind the scenes by creating a hidden ‘A’ record that points to a multi-data center cluster of redirect servers to reliably redirect your users to wherever you want them to go. It is almost as robust as our DNS infrastructure and comes with a 99.99% SLA vs. a 100% uptime SLA like standard DNS resource records do.
Things to keep in mind!
A CNAME cannot be created on the Apex or root of your domain. For example, you cannot make example.com (sometimes seen as @.example.com) be a CNAME to something else. This is not allowed per RFC. (Our web redirect does support apex domains, however.)
A web redirect only supports HTTP, not HTTPS (SSL). DNS is protocol agnostic, but our special web redirect is not. It is HTTP only. For us to support HTTPS, we would need to install a matching SSL certificate for your domain on our servers, which is not something we can support. And, of course, if we installed a generic SSL certificate, your users would get DNS errors. The only way around this would be to configure a redirect on your own web server. Sorry : (
Our web redirect supports both 302 and 301 HTTP response codes, giving you the flexibility to choose between a temporary redirect or a permanent one to keep the search engines happy.
So there you have it. Two great options depending on your needs! If you have any questions, post a comment below or contact our 24x7x365 support. We’re here to help!