AWS Blog

New Amazon CloudFront Feature: Default Root Object

If you have ever set up a web site from scratch, you know that you have to handle the root of the web site in a special way so that requests for the site’s root URL (e.g. are handled properly. You generally map the root URL to an HTML document such as index.html using an entry in the web server’s configuration file.

You can now set a default root object for any of your Amazon CloudFront distributions to duplicate this behavior for your own content. This object must be stored within the Amazon S3 bucket associated with the distribution. Once you have set the default root object, a request for the root URL of the distribution will return the contents of the default root object. 

With this change, you can now create a distribution that acts just like a static web site.

If you don’t set a default root object for a distribution, the response to a request for its root URL has not changed. Depending on the ACL on the distribution’s bucket and on the objects inside, the request could return a list of the contents of the bucket or a 403 error.

You can learn more about this new feature by reading the CloudFront documentation.

These partners support this new feature:

— Jeff;