All Products
Search
Document Center

Object Storage Service:0002-00000420

Last Updated:Mar 27, 2025

Problem description

The host field of the X-Amz-SignedHeaders parameter in the request is missing. The host field is required.

Causes

You initiated a request that uses an Amazon S3-compatible V4 signature, but the host field of the X-Amz-SignedHeaders parameter is missing.

Examples

The request you initiated includes the signature in the URL, but the host field of the X-Amz-SignedHeaders parameter is missing.

GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20221220/us-east-1/s3/aws4_request&X-Amz-Date=20221220T084818Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=range&X-Amz-Signature=ab2***st HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Range: bytes=100-900
x-oss-s3-compat: true

Solutions

Specify a valid value for the host field of the X-Amz-SignedHeaders parameter, and make sure that all parameters in the URL request are correctly specified. The following code provides an example on how to correctly specify the X-Amz-SignedHeaders parameter:

GET /test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LTAI****************/20221220/us-east-1/s3/aws4_request&X-Amz-Date=20221220T084818Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host;range&X-Amz-Signature=ab2***st HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Range: bytes=100-900
x-oss-s3-compat: true

We recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.