What do I do if the ExternalRedirectForbidden error code is returned?
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
-
For buckets created on or after 00:00:00 (UTC+8) on August 5, 2024, if you access objects by using object URLs or anonymous requests through the default public domain name of OSS, the requests are blocked because they trigger a redirection (an HTTP status code 3xx for redirection) rule preset for the bucket.
-
For buckets for which transfer acceleration is enabled on or after 00:00:00 (UTC+8) on August 5, 2024, if you access objects by using object URLs or anonymous requests through OSS-accelerated endpoints, the requests are blocked because they trigger a redirection (an HTTP status code 3xx for redirection) rule preset for the bucket.
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.