Score:0

Setting up custom domain for GCP load balancer

il flag

In this page

I mentioned we need to point the A record to load balancer IP.

enter image description here

My website domain.com already have landing page. I want to point api.domain.com to load balancer IP, but I can't set a CName to an IP (it needs to be a domain name), what should I do in this case?

John Hanley avatar
cn flag
Create a resource record in your DNS server: name api.domain.com, type A, with a value of the IP address of the load balancer. I am not sure why you are mentioning CNAME.
Score:0
cn flag

I believe this other link could help you to get the process, It is also from the GCP documentation 1 but from the Cloud DNS perspective.

As mentioned there, you will first need to create an A record and pointed either the instance with the public IP for your service or the load balancer IP in order to point your registered domain name to the IP address of the hosting server.

Additionally, you could add a CNAME record if needed, however the first step to follow is add the A record

https://cloud.google.com/dns/docs/tutorials/create-domain-tutorial#set-up-domain

Score:0
ye flag

If you want the users of your API to access your portal using a custom domain, you need to configure the Cloud Endpoints Portal and the DNS settings in your domain name registrar. When you add a custom domain to your portal, the Endpoints Portal displays the type of DNS record and other information that you need to configure in your domain name registrar.

In this link, you can find detailed information about setting up a custom domain

One advantage of using an HTTP(S) load balancer is that it gives you more control around your custom domain setup. For example, it allows you to use your own TLS certificate rather than the certificate that is automatically supplied when you use Cloud Run domain mapping. Using the load balancer also lets you route specific URL paths to the Cloud Run service.

Instruction on How Mapping a custom domain to a service here

Regarding to your question about records, this document can be useful to clarify some doubts

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.