Http Redirection—How It Works

Http redirection is needed when your own web server is not able to accept naked domain requests. CNAME records cannot be added without subdomain, so only A record with an IP address is the only way to use a naked domain.

A records with IP addresses are possible for static IP addresses only. For some services, the service provider does not support static IP addresses or requires CNAME records to be used.

There is a solution: http redirection service. Http redirection has nothing to do with DNS, it is a web server that takes a request and responds with a command that orders the client to go to a different address. This takes some time, but if the http redirect service is fast, it is ok. Note that the redirection occurs only once per client: after a redirection has performed (from yourname.com to www.yourname.com), your server takes over and serves all other responses directly.

We created a website in cloud storage, created a CNAME record for it in DNS Azure, and a http redirect rule. So, there were 3 requests to test: one with the direct address, one with the custom domain, and one with naked domain redirection. And here are the results, approximated from 1000 requests:

Direct address without custom domain 32 ms
 
CNAME with custom domain 35 ms
 
Naked domain with http redirection 63 ms
 

As you can see, the http redirection with our powerful servers did not take any more than 28 milliseconds extra. Of course, the results depend on the actual location of a client, but still, using http redirection for naked domains seems a reasonable option.