[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["If you use a custom domain in your project, consider also using your custom\ndomain in the emails sent for authentication events, such as email verification,\naddress change, and password recovery flows. You can configure your project to\nuse your custom domain in the emails' `From` field and action links.\n\nBy configuring custom domains for authentication emails, users will see the same\ndomain for your web address and the user management emails.\n\nThere are broadly two steps to setting this up:\n\n- Add the domain to your email templates in the Firebase console.\n- Verify your domain by adding DNS records in your domain registar.\n\nAdding the domain to your email templates\n\n1. In the Firebase console, open the\n [Templates page](//console.firebase.google.com/project/_/authentication/emails) of\n the Authentication section.\n\n2. For each email template, do the following:\n\n 1. Click the edit icon (edit).\n 2. Click **customize domain**.\n 3. Enter the domain you want to use.\n\nYou'll then see a table of DNS records to add to your domain registrar to verify\nthat you own the domain.\n\nVerify the domain\n\nAdd or update the TXT and CNAME DNS records given in the Firebase console.\nThe procedure for doing so depends on the registrar.\n\nYou can have only one `v=spf1...` TXT record for a particular domain. If you\nneed to specify multiple email addresses, combine them into one record.\n| **Note:** If you've used GoDaddy as your registrar, customers have reported that they're unable to add a record that only includes the apex domain, and instead need to use `@` in place of the apex domain.\n\nIt can take up to 24 hours for the domain to be verified. When it is, the\nTemplates page in the Firebase console will show a green \"Verification\ncomplete\" message. Then, you can click the **Apply Custom Domain** button to put\nyour changes into effect.\n\nMulti-tenant projects\n\nIf you have upgraded to Firebase Authentication with Identity Platform and enabled [multi-tenancy](https://cloud.google.com/identity-platform/docs/multi-tenancy-authentication),\nyou need to update [the tenant metadata](https://cloud.google.com/identity-platform/docs/reference/rest/v2/projects.tenants#inheritance)\nto allow the tenant to inherit custom domains, email templates, and custom SMTP settings.\nOtherwise, users still receive emails from the default domain even if the custom domain is\nsuccessfully verified and applied.\n\nYou can check if multi-tenancy is enabled by examining the URL included in Auth\nemail messages. If the URL includes a `tenant` parameter, you need to update\nyour project's tenant metadata.\n\nTo do so, run the following command: \n\n curl -X PATCH -d \"{'inheritance':{'emailSendingConfig': true}}\" \\\n -H \"X-Goog-User-Project: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\" \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H 'Content-Type:application/json' \\\n https://identitytoolkit.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT_ID\u003c/span\u003e\u003c/var\u003e/tenants/\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eTENANT_ID\u003c/span\u003e\u003c/var\u003e?updateMask=inheritance.emailSendingConfig"]]