無論 DNS 記錄儲存在何處,請在網域的 DNS 區域中建立 A 記錄。如果執行個體使用公開網路連線,請將 Looker (Google Cloud Core) 執行個體的連入公開 IP 做為 A 記錄的 IP 位址。您可以在 Google Cloud 控制台中,Looker (Google Cloud Core) 執行個體的「詳細資料」分頁中找到連入公開 IP。(「新增自訂網域」面板的「更新 DNS 記錄」部分中,「資料」欄位也會顯示這項資訊。)
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[],[],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)"]]