What do I do if the ExternalRedirectForbidden error code is returned?

Updated at:

This topic describes the causes of and solutions to the issue that the ExternalRedirectForbidden error code is returned when you access an object.

Problem description

If you access objects in a bucket anonymously or by using object URLs that contain the public domain name (format: bucketname.oss-[region].aliyuncs.com) or OSS-accelerated endpoints (format: bucketname.oss-accelerate.aliyuncs.com or bucketname.oss-accelerate-overseas.aliyuncs.com), the requests are denied. The HTTP status code 400 and the ExternalRedirectForbidden error code are returned.

Causes

  • If you use the default public domain name of a bucket created on or after 00:00:00 (UTC+8) on August 5, 2024 to access objects in the bucket anonymously or by using a signed URL and a preset redirection (an HTTP status code 3xx for redirection) rule is triggered, the redirection request is blocked.

  • If you use the OSS-accelerated endpoints of a bucket for which the transfer acceleration feature is enabled on or after 00:00:00 (UTC+8) on August 5, 2024 to access objects in the bucket anonymously or by using a signed URL and a preset redirection (an HTTP status code 3xx for redirection) rule is triggered, the redirection request is blocked.

Solutions

Use custom domain names to access objects in the preceding buckets. In this case, the redirection request is not blocked. For more information, see Map a custom domain name to the default domain name of a bucket.