CNAME not redirecting!

July 28, 2018 277 views
DNS Ubuntu 18.04

I am using Ubuntu with Apache with CloudFlare for the HTTPS.

Right now I have working. does not work.

Google returns error- uses an unsupported protocol.

I have a CNAME for www to redirect to but I keep getting that error....

Thanks for any help.

2 Answers
jarland MOD July 30, 2018
Accepted Answer

Hello friend!

It is important to note that a CNAME is not a redirect, but a DNS alias. To show the example:

An A record means:
name = IP

A CNAME means:
name = other name's IP
other name = IP

So a CNAME is basically a short way to reference another A record, while not having to change that DNS record if the other A record changes later. However, the server at the IP behind the A record that is referenced must still be prepared to accept requests for the title of the CNAME, or return the same content to any request made to the IP regardless of the name.

For example, let's say you have a virtual host for that displays your blog. You also have a default virtual host that displays a landing page if the web server receives a request that is not for Now you add a CNAME for to When someone visits, they will get the landing page because you have no virtual host for

I hope that makes sense. It's rather generic as I do not know much about your specific application / configuration.

Kind Regards,

Have another answer? Share your knowledge.