OBS uses the PUT method to configure a custom domain name for a bucket. After the configuration is successful, you can access the bucket through the domain name.
Ensure that the custom domain name can correctly resolve to the OBS service through DNS.
1 2 3 4 5 6 7 | PUT /?customdomain=domainname HTTP/1.1 User-Agent: curl/7.29.0 Host: bucketname.obs.region.example.com Accept: */* Date: date Authorization: authorization string Content-Length: 0 |
Parameter |
Description |
Mandatory |
---|---|---|
customdomain |
Custom domain name of a bucket. Type: string, which must meet the naming convention of domain names. Specifications: The value contains a maximum of 256 characters. No default value. Constraints: A bucket can have a maximum of five domain names. A custom domain name can be used for only one bucket. |
Yes |
This request uses common headers. For details about common request headers, see the section Common Request Headers.
This request involves no elements.
1 2 3 4 5 6 | HTTP/1.1 200 OK Server: OBS x-amz-request-id: request id x-amz-id-2: id Date: date Content-Length: 0 |
This response uses common headers. For details about common response headers, see the section Common Response Headers.
This response involves no elements.
No special error responses are returned. For details about error responses, see Table 1.
1 2 3 4 5 6 7 | PUT /?customdomain=obs.ccc.com HTTP/1.1 User-Agent: curl/7.29.0 Host: examplebucket.obs.region.example.com Accept: */* Date: Mon, 14 Jan 2019 08:31:36 +0000 Authorization: AWS UDSIAMSTUBTEST000094:u2kJF4kENs6KlIDcAZpAKSKPtnc= Content-Length: 0 |
1 2 3 4 5 6 | HTTP/1.1 200 OK Server: OBS x-amz-request-id: 000001697692CC5380E9D272E6D8F830 x-amz-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSsfu2GXj9gScHhFnrrTPY2cFOEZuvta Date: Wed, 13 Mar 2019 10:22:05 GMT Content-Length: 0 |