This topic describes the possible cause of and the solution to the NeedVerifyDomainOwnership: Please verify domain ownership by CreateCnameToken and try again. error when you map a custom domain name to a bucket.
Cause: The ownership of your domain name is not verified.
Solution: Verify the ownership of your domain name by performing the following steps.
- Call the CreateCnameToken operation to create a CNAME token that is used to verify the ownership of a domain name. Note By default, a CNAME token expires within 72 hours after it is created. If a new CNAME token is created within the validity period of the existing token, the existing CNAME token is returned.
Add a TXT record in the system of your domain name provider.
For example, add a TXT record for the custom domain name
example.com
. When you add a record, specify the TXT record type, specify _dnsauth.example as the host name, enter the CnameToken returned in Step 1 as the host value, and keep the default settings for the other parameters. For more information, see Step 1: Map a custom domain name.NoteAfter you add a TXT record, the TXT record requires several minutes to take effect.
Call the PutCname operation to map a custom domain name.