From the course: Google Cloud Platform (GCP) Essential Training for Developers

Setting up a custom domain for App Engine - Google Cloud Tutorial

From the course: Google Cloud Platform (GCP) Essential Training for Developers

Start my 1-month free trial

Setting up a custom domain for App Engine

- [Instructor] By default, App Engine applications are given a subdomain of appspot.com that is accessible to the web. But what if we want to have our own custom domain name linked to our application? We can do that by setting up a custom domain for our App Engine application. To do this, we go to the App Engine product page in the Google Cloud console. Inside the App Engine menu, we navigate to the settings page. In the settings page, we select the custom domains tab and open it. There are two options for adding a custom domain to our App Engine application. The first one is to link a domain that we already own. The second one is to register a new domain and link it to our app. We will go through the first option. Let's link a domain that we already own. Let's click on add a custom domain. There are three steps to this process. The first step is to select the domain we want to use. Since our domain is not in the list, we select verify a new domain and we type in our domain name, socialnetworkforpets.com. That's our domain name. And then we press the verify button. This will open the Google Webmaster Central Verification Console. This is what Google uses to verify that we are the owner of the domain name we are going to link. If your domain in register is in the list, you can select it. If not, you can choose other. I will choose other, this will open custom instructions on adding a text record to our DNS records for the domain name we want to link. Let's go ahead and copy that, and let's open the DNS records for our domain, and add a text record. Text record, and let's paste that, and let's press add record. Going back to Webmaster Central, let's press verify. Now, most of the time it takes several minutes for the DNS records to propagate. So we will have to wait a few minutes and keep on retrying. You can always leave this page and come back to it every few minutes to try again. The verification text doesn't change, so it's okay to retry, and we don't have to copy/paste new text records. Once it succeeds, like this one, we can now go back to the App Engine custom domains form and select our verified domain name. Let's press continue. The next step is to choose the domains and subdomains that we want to map to our app. Usually it's just the main domain and the www subdomain. You can add whatever subdomain you want, and also point it to your app. Press save mappings, and continue. Now Google Cloud will give us a list of DNS records to add to our domain in order for the custom domain mapping to be completed. To save time, I've already done that ahead. And you can see all the additional DNS records here. Since we've configured that already, let's go back and press done. And see how Google is automatically setting a managed and autorenewing SSL certificate so our site will be able to serve HTTPS traffic without us having to do anything else. No need to link or renew certificates. Google will take care of it automatically for us. This setup process takes about 15 minutes to complete. Now let's visit our new domain and see if it shows our app, socialnetworkforpets.com, and ta-da, our app is now live and accessible through our own domain name, perfect.

Contents