Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Website Endpoints

When you configure a bucket for website hosting, the website is available via the region-specific website endpoint. Website endpoints are different from the endpoints where you send REST API requests. For more information about the endpoints, see Request Endpoints.

The general form of an Amazon S3 website endpoint is as follows:

bucket-name.s3-website-region.amazonaws.com

For example, if your bucket is named example-bucket and it resides in the US Standard region, the website is available at the following Amazon S3 website endpoint:

http://example-bucket.s3-website-us-east-1.amazonaws.com/

The following table lists Amazon S3 regions and the corresponding website endpoints.

RegionWebsite endpoint
US Standardbucket-name.s3-website-us-east-1.amazonaws.com
US West (Oregon) Region

bucket-name.s3-website-us-west-2.amazonaws.com

US West (Northern California) Region

bucket-name.s3-website-us-west-1.amazonaws.com

EU (Ireland) Region

bucket-name.s3-website-eu-west-1.amazonaws.com

Asia Pacific (Singapore) Region

bucket-name.s3-website-ap-southeast-1.amazonaws.com

Asia Pacific (Sydney) Region

bucket-name.s3-website-ap-southeast-2.amazonaws.com

Asia Pacific (Tokyo) Region

bucket-name.s3-website-ap-northeast-1.amazonaws.com

South America (Sao Paulo) Region

bucket-name.s3-website-sa-east-1.amazonaws.com

In order for your customers to access content at the website endpoint, you must make all your content publicly readable. To do so, you can use a bucket policy or an ACL on an object to grant the necessary permissions.

Note

Requester Pays buckets or DevPay buckets do not allow access through the website endpoint. Any request to such a bucket will receive a 403 Access Denied response. For more information, see Requester Pays Buckets.

If you have a registered domain, you can add a DNS CNAME entry to point to the Amazon S3 website endpoint. For example, if you have registered domain, www.example-bucket.com, you could create a bucket www.example-bucket.com, and add a DNS CNAME record that points to www.example-bucket.com.s3-website-<region>.amazonaws.com. All requests to http://www.example-bucket.com will be routed to www.example-bucket.com.s3-website-<region>.amazonaws.com. For more information, see Virtual Hosting of Buckets.

Key Differences Between the Amazon Website and the REST API Endpoint

The website endpoint is optimized for access from a web browser. The following table describes the key differences between the Amazon REST API endpoint and the website endpoint.

Key DifferenceREST API EndpointWebsite Endpoint
Requests supported

Supports all bucket and object operations

Supports only GET and HEAD requests on objects.
Responses to GET and HEAD requests at the root of a bucketReturns a list of the object keys in the bucket.Returns the index document that is specified in the website configuration.
Error message handling

Returns an XML-formatted error response.

Returns an HTML document.
Access control

Supports both public and private content.

Supports only publicly readable content.
Redirection support

Not applicable

Supports both object-level and bucket-level redirects.