CNAME from www to root / domain not working

Posted July 7, 2019 4.6k views
DNSUbuntu 18.04

Hey guys. I’m trying to do a “redirection” from
to without using nginx.

In my droplet, other than the 3 NS, i have the below records:

A (@)        directs to
CNAME    is an alias of (@)

or you can refer to this screenshot.

I’m not sure what i’m doing wrong :(

Any help is appreciated, thank you!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

DNS just resolves domains to their corresponding IP address, so if both and are setup to point to the same IP address then you are all set.

What you are probably referring to is redirecting an HTTP request to to which would require updating your HTTP server. If you are using nginx, then you would need to update your nginx configuration to do that.

Likewise if you are using a different webserver then it would require you to update the configuration there.

To do it via nginx here is a tutorial:

by Mitchell Anicas
This tutorial will show you how to redirect a www URL to non-www, e.g. `` to ``, with Nginx on CentOS 7. We will also show you how to redirect in the other direction, from a non-www URL to www.