need setup help for google cdn with wordpress

206 Views Asked by At

How can i setup cloud CDN? I have followed the guides.

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?

As on cloudflare you can use main domain for cdn (mydomain.com) but i am not able to use in google cdn.

After creating the CDN, should i create A name ? (If i create A name - i have to delete main A name)

My server is on aws lightsail and dns is on namecheap

How can i add A name ? I am confused

Help will be appreciated.

1

There are 1 best solutions below

0
On

The Domain configuration/setup has nothing to do with CDN and it is a caching service. For domain mapping, you have to use Google Cloud DNS. Similar to Cloudflare which provides DNS service, you can configure just main domain(domain.com) or also subdomain in the Google Cloud DNS [1]

If you are about to map/setup your domain in Google Cloud DNS,

i) The NS records which are created in the Google Cloud DNS once the zone is created, needs to be updated in the Namecheap site so that the connectivity between registered domain and NS in Google DNS is established.

ii) Then ‘A name’ needs to be created in Google Cloud DNS to map the domain with the external IP address of the hosting server and the same detail also needs to be updated with your domain registrar i.e., Namecheap.

iii) If you are making use of Load balancer, then make sure that 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.

To make use of Google CDN, you just need to enable/disable CDN while configuring load balancer -> backend services [2] and if you are using Internet NEG, you need to map the domain name in the Create a network endpoint group page.

[1]https://cloud.google.com/dns/docs/quickstart#update_your_domain_name_servers

[2]https://cloud.google.com/cdn/docs/setting-up-cdn-with-external-origin

Regards, Anbu.