How do I configure Amazon CloudFront to forward host headers to the origin?
Last updated: 2018-11-19
I want my Amazon CloudFront distribution to forward the host header to the origin. How can I do that?
Note: This resolution applies to origins other than an Amazon Simple Storage Service (Amazon S3) bucket. If you're using an Amazon S3 origin, avoid whitelisting the host header. For more information, see Selecting the Headers to Base Caching On.
- Open the Amazon CloudFront console, and then choose your distribution.
- Choose the Behaviors view, and then choose the path you are using.
- Choose Edit.
- For Cache Based on Selected Request Headers, choose Whitelist.
- Under Whitelist Headers, choose Host from the column on the left, and then choose Add.
- Choose Yes, Edit.