Skip to main content

CloudFront distributions should have a default root object configured

Severity: Critical

Resource Types: AWS::CloudFront::Distribution

Description

This control checks whether an Amazon CloudFront distribution is configured to return a specific object that is the default root object. The control fails if the CloudFront distribution does not have a default root object configured.

A user might sometimes request the distribution’s root URL instead of an object in the distribution. When this happens, specifying a default root object can help you to avoid exposing the contents of your web distribution.

Remediation

For detailed instructions on how to specify a default root object for your distribution, see How to specify a default root object.