Configuring a Custom Domain Name for a Bucket
Functions
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.
Request Syntax
PUT /?customdomain=domainname HTTP/1.1User-Agent: curl/7.29.0Host: bucketname.obs.region.example.comAccept: */*Date: dateAuthorization: authorization stringContent-Length: 0
Request Parameters
Parameter | Description | Mandatory |
---|---|---|
customdomain | Explanation: Custom domain name of a bucket. Type: String, which must meet the naming conventions of domain names. Restrictions: A bucket can have a maximum of 30 domain names. One custom domain name can be used for only one bucket. Value range: The maximum length is 256 bytes. Default value: None | Yes |
Request Header
This request uses common headers. For details, see Table 3.
Request Elements
This request involves no elements.
Response Syntax
HTTP/1.1 200 OKServer: OBSx-obs-request-id: request idx-obs-id-2: idDate: dateContent-Length: 0
Response Headers
The response to the request uses common headers. For details, see Table 1.
Response Elements
This response contains no elements.
Error Responses
No special error responses are returned. For details about error responses, see Table 2.
Sample Request
PUT /?customdomain=obs.ccc.com HTTP/1.1User-Agent: curl/7.29.0Host: examplebucket.obs.region.example.comAccept: */*Date: Mon, 14 Jan 2019 08:31:36 +0000Authorization: OBS UDSIAMSTUBTEST000094:u2kJF4kENs6KlIDcAZpAKSKPtnc=Content-Length: 0
Sample Response
HTTP/1.1 200 OKServer: OBSx-obs-request-id: 000001697692CC5380E9D272E6D8F830x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSsfu2GXj9gScHhFnrrTPY2cFOEZuvtaDate: Wed, 13 Mar 2019 10:22:05 GMTContent-Length: 0
- Functions
- Request Syntax
- Request Parameters
- Request Header
- Request Elements
- Response Syntax
- Response Headers
- Response Elements
- Error Responses
- Sample Request
- Sample Response