0

After creating load balancer and backend service with Internet network endpoint group

Can i use mydomain.com in google cdn or I have to use cdn.mydomain.com?

Is there any way to use full domain like cloudflare does it?

2 Answers2

0

Yes, you can use a custom domain on Cloud CDN, you might need to wait for the updated DNS settings to propagate. Then test your domain (for example, backend.example.com) in the web browser.

If something goes bad, try to troubleshoot it following the steps of the next link [1].

[1] https://cloud.google.com/load-balancing/docs/https/troubleshooting-ext-https-lbs#custom-origins-internet-neg

0

Google Cloud DNS service is used to manage your DNS records, so you can use the main domain (mydomain.com) and also go for your custom domain. Both Cloud CDN and Cloud DNS are different things, DNS is used to set up your domain and CDN is only used for caching data along with HTTPS(s) Load Balancer. Hence you should not be using the prefix CDN with mydomain.com.

First you have to set up your domains .Please go through the link [1] for setting up domains using Cloud DNS.After domain name setting, you have to perform below steps while creating HTTP(S) Load Balancer.

 1. In the backend configuration of Load Balancer, select the backend type as 'Internet network endpoint group'.
 2. Then in the new backend, select 'Create Internet network endpoint group', so it will redirect you to Create a network endpoint group page.
 3. In that page you have to mention your domain name. Please refer to the screenshot.
 4. Once you create Internet NEG,then again go back to your LB backend. In backend configuration, enable the 'Enable Cloud CDN' option.

Refer to the document [2] for detailed information, which guides you how to configure a global external HTTP(S) load balancer with a Cloud CDN-enabled backend service that proxies to a custom origin server at your domain.

Once you perform these steps, make sure that all A records of your domain are pointing to the IP address of your Load Balancer so the traffic going to your website will be rerouted to LB and checked if they are cacheable for Cloud CDN.

[1] https://cloud.google.com/dns/docs/tutorials/create-domain-tutorial [2]https://cloud.google.com/cdn/docs/setting-up-cdn-with-external-origin

DNS