0017-00000249
Updated at:
Problem description
The Cname parameter in the PutCname request is invalid when you bind a custom domain name to a bucket.
Causes
The domain name in the <Domain> element of BucketCnameConfiguration is too short. The entire hostname must be longer than 3 ASCII characters. For example, w.c is exactly 3 characters and does not meet the minimum length requirement.
Examples
The following request fails because the domain name w.c contains only 3 characters:
https://jctest2.oss-ap-northeast-1.aliyuncs.com/?cname&comp=add
Authorization: OSS LTAI********************:A4zW************************
Date: Wed, 08 Feb 2023 05:08:22 GMT
<BucketCnameConfiguration>
<Cname>
<Domain>w.c</Domain>
</Cname>
</BucketCnameConfiguration>Error response:
<Error>
<Code>InvalidArgument</Code>
<Message>Entire hostname must be longer than 3 ASCII characters.</Message>
<RequestId>63E32E6323B11831314569B5</RequestId>
<HostId>jctest2.oss-ap-northeast-1.aliyuncs.com</HostId>
</Error>Solutions
Use a custom domain name that is longer than 3 ASCII characters, such as example.com.
References
Is this page helpful?