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. http://aws.amazon.com) 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;


This is a great new feature! We - and a lot of other AWS users - have been waiting for this for a long time. Thank you guys for granting our wishes.
Keep up the good work
regards,
Menno
Posted by: Menno | August 05, 2010 at 10:30 PM
This is great. I created a simple site for my wife using CloudFront and had to mess with the DNS etc to get it to look like it works.
This is cool.
Rob
Posted by: Robert Doyle | August 06, 2010 at 02:46 AM
If we could also get object-object 301 redirects, creating 'static' sites with S3 and CloudFront would be much more feasible.
Are there any plans to allow control over the HTTP response code, or simply a redirect option for objects that want to change name / become stale?
Posted by: Andrew Bruce | August 27, 2010 at 01:01 PM
What happens to request to a directory root, like http://mydist/a/directory, will it be redirected to http://mydist/a/directory/index.html? I'd imagine it confusing since a/directory and a/directory/index.html are two different S3 objects, but it'd still make sense to redirect to index when a/directory does not exist.
Posted by: Jiaqi | June 20, 2011 at 09:12 AM