Problem description
The domain name in your request is invalid.
Causes
The domain name that you accessed is not a third-level domain.
Examples
The following request triggers this error because the Host header uses a plain endpoint without the bucket name:
GET /oss-example/test.txt HTTP/1.1
Host: oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMTSolutions
Use the BucketName.Endpoint format in all requests, where BucketName is the name of your bucket and Endpoint is the regional endpoint. Example: https://example-bucket.oss-cn-hangzhou.aliyuncs.com.
The following table shows the difference between an incorrect request and a correct request:
| Request | |
|---|---|
| Incorrect (bucket name in path) | Host: oss-cn-hangzhou.aliyuncs.com |
| Correct (bucket name as subdomain) | Host: oss-example.oss-cn-hangzhou.aliyuncs.com |
The correct request looks like this:
GET /test.txt HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMTNote: TheGetService (ListBuckets)operation is an exception that does not require the bucket name in the domain. All other requests must use theBucketName.Endpointformat.
该文章对您有帮助吗?