Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding DNS requirements for Google App Engine apps

I have a Google App Engine working, and I have bought a domain. To link the two, I followed the official guide.

Specifically, the guide suggests setting up these DNS rules:

enter image description here

The thing is, I own both the naked domain (site.com) and the www subdomain (www.site.com). Following the guide, I set up the following rules:

Type      Name               Value
A         site.com.          216.239.32.21
A         site.com.          216.239.34.21
A         site.com.          216.239.36.21
A         site.com.          216.239.38.21
(other AAAA for site.com.)
CNAME     www.site.com.      ghs.googlehosted.com

Questions

I think what I did is correct, because it works: I can type both site.com and www.site.com and be directed to my app. But I have some confusion regarding the www subdomain.

  1. What is ghs.googlehosted.com , and why do I need a CNAME on that for the www subdomain? Why no A records for www?

  2. How is the subdomain working? I have no A records for that, just this CNAME, but still it points to my IP.

  3. I don’t understand the guide when it says:

Typically you list the host name along with the canonical name as the address. In our example, one of the records you would add is the host name www with the address ghs.googlehosted.com. (If you use a naked domain, you would use @ as the host name and a corresponding value from the Add new custom domain form.)

Can you explain the meaning of this paragraph? What’s this @?

like image 547
natario Avatar asked Sep 19 '16 15:09

natario


People also ask

Which programming environment is used for Google App Engine?

js, Java, Ruby, C#, Go, Python, or PHP. A fully managed environment lets you focus on code while App Engine manages infrastructure concerns. Use Cloud Monitoring and Cloud Logging to monitor the health and performance of your app and Cloud Debugger and Error Reporting to diagnose and fix bugs quickly.

What are the components in Google App Engine infrastructure?

Google App Engine primarily supports Go, PHP, Java, Python, Node. js, . NET, and Ruby applications, although it can also support other languages via "custom runtimes". The service is free up to a certain level of consumed resources and only in standard environment but not in flexible environment.

What is the difference between Google App Engine and Google Compute Engine?

Compute Engine delivers configurable virtual machines running in Google's data centers with access to high-performance networking infrastructure and block storage solutions. App Engine is a fully managed, serverless platform for developing and hosting web applications at scale.


2 Answers

The guide is suggesting you to use one of the DNS type either use A and AAAA(IPv6) or CNAME.

1) You can use A & AAAA record for www subdomain. Just make the DNS to

A         www.site.com.          216.239.38.21
(other AAAA for site.com.)

2) The reason why your www subdomain is working because your pointing www.site.com -> ghs.googlehosted.com. See there is www. before your site.com

CNAME     www.site.com.      ghs.googlehosted.com

3) @ is used to denote the current origin. So when you use @ it translates to site.com.

To make things simpler i would just use the following DNS entries. This way my website is accessible by both naked domain and www subdomain.

CNAME     www.site.com.      ghs.googlehosted.com
CNAME     @      ghs.googlehosted.com

If you just want to serve your website via naked domain.

CNAME     www.site.com.      site.com
CNAME     @      ghs.googlehosted.com

Here we point our www subdomain to naked domain.

like image 160
Roney Thomas Avatar answered Oct 26 '22 06:10

Roney Thomas


I've just been through this process, and was also confused by the requirements shown on the screenshot presented by the OP. In 2020 it still looks pretty much the same.

It does seem to imply you need A, AAAA and CNAME (which is makes no sense - A and CNAME are contradictory). My DNS registrar - cloudflare - does not allow you to setup these options together.

To help anyone else searching and finding this page, I noticed on this page of docu the following line:

Record type: Enter the record type that is shown in the DNS record Google created for you (A, or AAAA, or CNAME).

This makes it clear you can just setup one set.

like image 24
Jon Egerton Avatar answered Oct 26 '22 05:10

Jon Egerton