All Products
Search
Document Center

Object Storage Service:How Do I Configure HTTPS Requests and SSL Certificates?

Last Updated:Aug 25, 2026

Configure HTTPS

To access Object Storage Service (OSS) resources over HTTPS using a custom domain name, purchase an SSL certificate and host it in OSS. For more information, see Access OSS over HTTPS.

Force HTTPS

By default, OSS accepts both HTTP and HTTPS requests. To block unencrypted traffic, configure a bucket policy that denies all non-HTTPS requests.

The following policy denies any request to examplebucket that does not use HTTPS. Replace 175708322470**** with the bucket owner's UID and examplebucket with the actual bucket name.

{
  "Version": "1",
  "Statement": [{
      "Effect": "Deny",
      "Action": [
        "oss:*"
      ],
      "Principal": [
        "*"
      ],
      "Resource": [
        "acs:oss:*:175708322470****:examplebucket",
        "acs:oss:*:175708322470****:examplebucket/*"
      ],
      "Condition": {
        "Bool": {
          "acs:SecureTransport": [
            "false"
          ]
        }
      }
    }
      ]
  }

References

For more information about the elements in the policy syntax, see RAM Policy.

For more information about how to configure a bucket policy, see Authorize users to access specific resources using a bucket policy.