无论您的 DNS 记录存储在哪里,都请在您网域的 DNS 区域中创建 A 记录。对于使用公共网络连接的实例,请使用 Looker (Google Cloud Core) 实例的入站公共 IP 作为 A 记录的 IP 地址。您可以在 Google Cloud 控制台中 Looker (Google Cloud core) 实例的详情标签页上找到入站公共 IP。(它也会显示在添加新的自定义网域面板的更新 DNS 记录部分中的数据字段中。)
如果 Looker (Google Cloud Core) 实例的自定义网域标签页上显示验证网域按钮,则您的 DNS 记录可能需要进行额外配置。点击验证网域,完成自定义网域的设置。
在网域的 DNS 记录更新完毕且网域已在 Google Cloud 控制台中通过验证后,映射到实例的自定义网域的状态将在自定义网域标签页中从未验证更新为可用。
更新 OAuth 凭据
在 Google Cloud 控制台中,依次前往 API 和服务 > 凭据,然后选择 Looker (Google Cloud Core) 实例使用的 OAuth 客户端的 OAuth 客户端 ID,即可访问您的 OAuth 客户端。
点击添加 URI 按钮,以更新 OAuth 客户端中的已获授权的 JavaScript 来源字段,使其包含贵组织将用于访问 Looker (Google Cloud Core)的相同 DNS 名称。例如,如果您的自定义网域是 looker.examplepetstore.com,则应输入 looker.examplepetstore.com 作为 URI。
更新或添加自定义网域,将其添加到您创建 Looker (Google Cloud Core) 实例时使用的 OAuth 凭据的已获授权的重定向 URI 列表中。在 URI 末尾添加 /oauth2callback。例如,如果您的自定义网域是 looker.examplepetstore.com,则应输入 looker.examplepetstore.com/oauth2callback。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["You can serve your instance through a custom web domain rather than through the default domain that Looker (Google Cloud core) provides.\n\nThis documentation page describes custom domain setup for instances that meet **one of** the following criteria:\n\n- The instance uses public secure connections.\n- The instance uses hybrid connections.\n\nIf you create a custom domain with an instance that uses a public network connection, Google provides a managed, auto-renewing SSL certificate.\n\nTo implement a custom domain for this kind of instance, you must perform the following steps:\n\n1. [Set up the custom domain](#create_a_custom_domain).\n2. [Create the DNS A record](#create_a_dns_record).\n3. [Update the OAuth credentials](#update_the_oauth_credentials).\n\n| **Important:** If your instance has hybrid connections, you can follow the instructions on this page; however, if you change to a private connections configuration at any point, your custom domain will be invalidated and you will need to recreate it for your private connections configuration.\n\nSet up a custom domain\n\nAfter your Looker (Google Cloud core) instance has been created, you can set up a custom domain.\n\nBefore you begin **Note:** Custom domains cannot be created using a looker.com domain.\n\nBefore you can customize the domain of your Looker (Google Cloud core) instance, identify where your domain's DNS records are stored, so that you can update them.\n\nRequired roles\n\n\nTo get the permissions that\nyou need to create a custom domain for a Looker (Google Cloud core) instance,\n\nask your administrator to grant you the\n\n\n[Looker Admin](/iam/docs/roles-permissions/looker#looker.admin) (`roles/looker.admin`)\nIAM role on the project the instance resides in.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nCreate a custom domain **Note:** You cannot modify a custom domain once it is created. If you want to make changes to the custom domain, you must delete the existing custom domain and create a new one.\n\nIn the Google Cloud console, follow these steps to customize the domain of your Looker (Google Cloud core) instance:\n\n1. On the **Instances** page, click the name of the instance for which you would like to set up a custom domain.\n2. Click the **CUSTOM DOMAIN** tab.\n3. Click **ADD A CUSTOM DOMAIN**.\n\n This opens the **Add a new custom domain** panel.\n4. Using only letters, numbers, and dashes, enter the hostname of up to 64 characters for the web domain that you would like to use --- for example: `looker.examplepetstore.com`.\n\n5. Click **DONE** on the **Add a new custom domain** panel to return to the **CUSTOM DOMAIN** tab.\n\n| **Note:** Updating the custom domain takes 10 to 15 minutes to complete.\n\nOnce your custom domain is set up, it is displayed in the **Domain** column on the **CUSTOM DOMAIN** tab of the Looker (Google Cloud core) [instance details page](/looker/docs/looker-core-custom-domain-settings) in the Google Cloud console.\n\nAfter your custom domain has been created, you can [view information](/looker/docs/looker-core-custom-domain-settings) about it, or [delete](/looker/docs/looker-core-custom-domain-delete) it.\n\nAccess the custom domain\n\nTo set up access to a custom domain for a Looker (Google Cloud core) instance that uses public secure connections, create a DNS record and update the OAuth credentials.\n\nBefore you begin\n\n\nTo get the permissions that\nyou need to set up access to a public secure connections custom domain,\n\nask your administrator to grant you the\nfollowing IAM roles on the project the instance resides in:\n\n- [Looker Admin](/iam/docs/roles-permissions/looker#looker.admin) (`roles/looker.admin`)\n- [DNS Admin](/iam/docs/roles-permissions/dns#dns.admin) (`roles/dns.admin`)\n- Use Google OAuth: [OAuth Config Editor](/iam/docs/roles-permissions/oauthconfig#oauthconfig.editor) (`roles/oauthconfig.editor`)\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nCreate a DNS record\n\nWherever your DNS records are stored, create an A record in the DNS zone for your domain. For an instance that uses a public network connection, use the Looker (Google Cloud core) instance's ingress public IP for the A record's IP address. The ingress public IP can be found on the [**Details**](/looker/docs/looker-core-view-console#the_details_and_custom_domain_tabs) tab of the Looker (Google Cloud core) instance in the Google Cloud console. (It is also displayed in the **Data** field in the **Update your DNS records** section of the **Add a new custom domain** panel.)\n\nIf a **VERIFY DOMAIN** button appears on the **CUSTOM DOMAIN** tab of the Looker (Google Cloud core) instance, your DNS record may require additional configuration. Click **VERIFY DOMAIN** to complete the setup of your custom domain.\n| **Note:** It may take up to 24 hours for any changes to your DNS record to take effect. The SSL certificate that is associated with your DNS record may require several minutes to activate.\n\nOnce your domain's DNS records are updated and your domain has been verified in the Google Cloud console, the [status](/looker/docs/looker-core-custom-domain-settings) of the custom domain that is mapped to the instance will be updated from **Unverified** to **Available** on the **Custom domain** tab.\n\nUpdate the OAuth credentials **Note:** You can use any OAuth client to create authorization credentials for your Looker (Google Cloud core) instance. As an example, these steps walk you through updating the credentials using the Google Cloud console. If you are using a different client, adjust the steps accordingly.\n\n1. Access your OAuth client by navigating in the Google Cloud console to **APIs \\& Services \\\u003e Credentials** and selecting the OAuth client ID for the OAuth client that is used by your Looker (Google Cloud core) instance.\n2. Click the **Add URI** button to update the **Authorized JavaScript origins** field in your OAuth client to include the same DNS name that your organization will use to access Looker (Google Cloud core). For example, if your custom domain is `looker.examplepetstore.com`, you would enter `looker.examplepetstore.com` as the URI.\n\n3. [Update or add](/looker/docs/looker-core-create-oauth#add_the_authorized_redirect_uri_to_the_oauth_client) the custom domain to the list of **Authorized redirect URIs** for the [OAuth credentials that you used](/looker/docs/looker-core-create-oauth) when you created the Looker (Google Cloud core) instance. Add `/oauth2callback` to the end of the URI. For example, if your custom domain is `looker.examplepetstore.com`, you would enter `looker.examplepetstore.com/oauth2callback`.\n\nAdd users\n\nOnce the preceding steps are completed, the custom domain URL is accessible to users.\n\nEnsure that the [user authentication method](/looker/docs/looker-core-user-authentication) is completely set up for the Looker (Google Cloud core) instance before adding users to the instance.\n\nWhat's next\n\n- [Manage users within Looker (Google Cloud core)](/looker/docs/looker-core-user-management)\n- [Configure your Looker (Google Cloud core) instance](/looker/docs/looker-core-instance-setup)\n- [Connect Looker (Google Cloud core) to your database](/looker/docs/looker-core-dialects)"]]