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?

Resolution

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.

  1. Open the Amazon CloudFront console, and then choose your distribution.
  2. Choose the Behaviors view, and then choose the path you are using.
  3. Choose Edit.
  4. For Cache Based on Selected Request Headers, choose Whitelist.
  5. Under Whitelist Headers, choose Host from the column on the left, and then choose Add.
  6. Choose Yes, Edit.

Did this article help you?

Anything we could improve?


Need more help?