Cloud Domains: Use Cname in root domain

Hello everyone, how are you?

Could someone assist me or confirm if it's possible within Google Cloud DNS to create a CNAME redirection for a root domain? I want to direct traffic from the address example.com to ex.com.

Is it possible to achieve this using Google Cloud DNS? I need to create this redirect using CNAME for an application to work.

When I tried to do this with a blank domain, I received this alert: "A name can have a set of CNAME resource records or one of other types, but not both."

2 1 396
1 REPLY 1

Hi @Nitrox ,


@Nitrox wrote:

Could someone assist me or confirm if it's possible within Google Cloud DNS to create a CNAME redirection for a root domain? I want to direct traffic from the address example.com to ex.com.


In Cloud DNS or any DNS service, you cannot use a CNAME record at the root domain while having other records like A, MX, or NS records at the same level. The error message saying, "A name can have a set of CNAME resource records or one of other types, but not both," is correct based on DNS rules. Essentially, you can't mix CNAME with other record types at the top level of a domain.

You have to create an A-record for the root domain (example.com) and point it to the IP address of a server that handles the redirection. Consider using Google Cloud Load Balancer with a backend service that performs the HTTP redirect.