PUT Bucket Custom Domain

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.1
User-Agent: curl/7.29.0
Host: bucketname.obs.region.example.com
Accept: */*
Date: date
Authorization: authorization string
Content-Length: 0

Request Parameters

Table 1 Request parameters

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

Request Headers

This request uses common headers. For details about common request headers, see the section Common Request Headers.

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: request id
x-amz-id-2:  id
Date: date
Content-Length: 0

Response Headers

This response uses common headers. For details about common response headers, see the section Common Response Headers.

Response Elements

This response involves no elements.

Error Responses

No special error responses are returned. For details about error responses, see Table 1.

Sample Request

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

Sample Response

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