Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Website Endpoints

When you configure a bucket as a website, the website is available via the region-specific website endpoint. The website endpoint you use must be in the same region that your bucket resides. These website endpoints are different than the REST API endpoints (see Request Endpoints). Amazon S3 supports the following website endpoint.

s3-website-region.amazonaws.com

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

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

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

US West (Northern California) Region

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

EU (Ireland) Region

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

Asia Pacific (Singapore) Region

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

Asia Pacific (Tokyo) Region

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

South America (Sao Paulo) Region

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

In order for your customers to access content on the website endpoints, you must make all your content publicly readable. To make your content publicly readable, you can use a bucket policy or an objects ACL to grant these permissions.

[Note]Note

Requester Pays (see Requester Pays Buckets ) or DevPay buckets do not allow access via the website endpoint. Any request to a bucket set up for Requester Pays or DevPay via the website endpoint will receive a 403 Access Denied response.

If your bucket, (i.e., example-bucket) 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/

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 entry pointing 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 via a web browser. The following table describes the key differences between the Amazon REST API endpoint (see Request Endpoints) and the website endpoint.

Key DifferenceREST API EndpointWebsite Endpoint
Requests supported

Supports all the bucket and object operations

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

When a request to a REST API endpoint results in an error, Amazon S3 returns an XML error response.

When a request to a website endpoint results in an error, an HTML document is returned. However, you can optionally provide a custom error document when configuring a website, providing your customers with a more user-friendly experience. Amazon S3 will return this custom error document for any HTTP 4XX class of errors.
Access control

Supports both public and private content.

Supports only publicly readable content.