A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/appengine/docs/legacy/standard/python/mapping-custom-domains below:

Mapping Custom Domains | App Engine standard environment for Python 2

Mapping Custom Domains

Stay organized with collections Save and categorize content based on your preferences.

You can use a custom domain rather than the default address that App Engine provides for your app.

To use a custom domain, map the domain to your app, then update your DNS records. You can map a naked domain, such as example.com or a subdomain, such as subdomain.example.com. You can also use wildcards to map subdomains.

By default, when you map a domain to your app, App Engine issues a managed certificate for SSL for HTTPS connections. For more information on using SSL with your custom domain, including how to use your own SSL certificates, see Securing your custom domains with SSL.

Using custom domains might add noticeable latency to responses that App Engine sends to your app's users in some regions. The regions are as follows:

App Engine custom domains use a pool of shared IP addresses for all applications. If you want to use an IP address that only maps to your domain then you should instead set up a load balancer with App Engine. This may mitigate a domain fronting issue in which a request to application A in the SNI certificate may be routed to application B in the HTTP Host header.

Before you begin Mapping a custom domain to your app Note: These instructions describe using the Google Cloud console to map custom domains. If you prefer, you can use gcloud commands or the Admin API.
  1. In the Google Cloud console, go to the Application settings tab of the App Engine Settings page.

    Go to the Application settings page

    If you do not need to modify the default Google Accounts API Referrer, move to the next step.

    If you need to enable Google Workspace authentication for your custom domain, click Edit to modify the Google Accounts API Referrer. In the Google Authentication drop-down menu, select Google Workspace domain, then add your domain such as example.com in the empty field.

  2. In the Google Cloud console, go to the Custom Domains tab of the App Engine Settings page.

    Go to the Custom Domains page

  3. Click Add a custom domain.

  4. If your domain is already verified, the domain appears in the Select the domain you want to use section. Select the domain from the drop-down menu and click Continue.

    If you haven't verified your domain yet, do the following:

    1. Select Verify a new domain from the drop-down menu.
    2. Enter your naked domain name (such as "example.com") and click Verify.

      Even if you only want to map a subdomain, such as "www.subdomain.example.com", enter the naked domain name to verify ownership.

      Note that domain names must be shorter than 64 bytes.

    3. Enter information in the Search Console window that appears. For help using Search Console, see Search Console help

    4. After you complete the steps in Search Console, return to the Add a new custom domain page in the Google Cloud console.

  5. In the Point your domain to [project-ID] section, specify the domain and subdomains that you want to map.

    We recommend mapping the naked domain and the www subdomain. You can add more subdomains if you need them.

    When you've added all the mappings you want, click Save mappings.

  6. Click Continue to see your domain's DNS records.

    You can retrieve these records any time on the Custom Domains tab of the App Engine Settings page.

  7. Sign in to your domain registrar web site and update your DNS records with the records displayed in the previous step.

Updating DNS records at your domain registrar Note: If you have a custom domain set up for your App Engine app and want to move it to a different Google Cloud project, you do not need to update your custom domain DNS records as these will remain fixed for the domain when you switch projects.

After you've mapped your service to a custom domain in App Engine, you need to update your DNS records at your domain registrar. As a convenience, App Engine generates and displays the DNS records you need to enter.

Note: Some third party CDN providers might inadvertently intercept validation requests, preventing them from reaching the App Engine app and causing the domain mapping to fail or its certificate to fail to renew. For example, if you are using Cloudflare CDN, you should turn off the "Always use https" option in the "Edge Certificates" tab of the SSL/TLS tab.
  1. Retrieve the DNS record information for your domain mappings:

    In the Google Cloud console, go to the Custom Domains tab of the App Engine Settings page. The page lists DNS records for all of the domains you have mapped to your app.

  2. Log in to your account at your domain registrar and open the DNS configuration page.

  3. Locate the host records section of your domain's configuration page and add each of the DNS records that you retrieved when you mapped your domain to your app.

    Enter the following information in the record fields:

  4. Save your changes in the DNS configuration page of your domain's account. In most cases, it takes only a few minutes for these changes to take effect, but in some cases it can take up to several hours, depending on the registrar and the Time-To-Live (TTL) of any previous DNS records for your domain. You can use a dig tool, such as this online dig version, to confirm the DNS records have been successfully updated.

  5. Test for success by browsing to your service at its new URL, for example https://www.example.com. Note that it can take several minutes for the automatic SSL certificate to be issued.

Delegating ownership to other Google Cloud users or service accounts

If you need to delegate the ownership of your domain to other users or service accounts, you can add permission through the Search Console page:

  1. Open the Search Console verification page.

  2. Under Properties, click the domain for which you want to add a user or service account.

  3. At the end of the Verified owners list, click Add an owner, then enter a Google Account email address or service account ID.

    To view a list of your service accounts, open the Service Accounts page in the Google Cloud console:

    Go to Service Accounts page

Using subdomains

If you set up a wildcard subdomain mapping for your custom domain, your application serves requests for any matching subdomain.

Wildcard mappings

You can use wildcards to map subdomains at any level, starting at third-level subdomains. For example, if your domain is example.com and you enter text in the web address field:

You can use wildcard mappings with services in App Engine by using the dispatch.yaml file to define request routing to specific services.

Note: Wildcard mappings are not supported for managed SSL certificates.

If you use Google Workspace with other subdomains on your domain, such as sites and mail, those mappings have higher priority and are matched first, before any wildcard mapping takes place. In addition, if you have other App Engine apps mapped to other subdomains, those mappings also have higher priority than any wildcard mapping.

Some DNS providers might not work with wildcard subdomain mapping. In particular, a DNS provider must permit wildcards in CNAME host entries.

Wildcard routing rules apply to URLs that contain components for services, versions, and instances, following the service routing rules for App Engine.

Deleting custom domains from your app

In order to delete a custom domain mapping from your app, your account must have the App Engine Admin role (roles/appengine.appAdmin) or a custom role that contains the appengine.applications.update permission.

In the Google Cloud console, do the following:

  1. Go to the Custom Domains tab of the App Engine Settings page.

    Go to the Custom Domains page

  2. Select the custom domain name and click Delete.

Alternatively, you can use gcloud commands or the Admin API to delete custom domains.

Troubleshooting

If your app shows authentication errors after configuring your custom domain with G Suite domain authentication, remove your custom domain mapping and redo the Mapping a custom domain to your app steps. Make sure to configure your G Suite domain authentication before configuring your custom domain mapping in App Engine.

What's next

Secure your custom domains with SSL.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["App Engine allows you to use a custom domain (like `example.com` or `subdomain.example.com`) instead of the default App Engine address by mapping the domain and updating your DNS records."],["By default, App Engine provides a managed SSL certificate for HTTPS connections when you map a custom domain, but you also have the option to use your own SSL certificates."],["Mapping a custom domain to your App Engine application requires either the App Engine Admin role or a custom role with the `appengine.applications.get` permission, and domain ownership verification is needed unless you use Google Domains."],["You can map wildcard subdomains (e.g., `*.example.com`) to your App Engine app to handle requests for any subdomain, but note that wildcard mappings are not supported for managed SSL certificates, and some DNS providers may not work with wildcard subdomain mapping."],["If you utilize Cloud Load Balancing to direct traffic to your App Engine application, it's advised to map your custom domain to the load balancer rather than directly to your application, and use SSL certificates created for the load balancer."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4