A website sits behind an ALB origin for a CloudFront distribution. After routing all traffic through CloudFront with a Route 53 CNAME, mobile clients begin receiving the desktop version of the site. What should the SysOps administrator change to ensure CloudFront preserves device-specific responses?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure the CloudFront cache behavior to forward the User-Agent header to the origin..
Why this is the answer
The correct answer is to configure the CloudFront cache behavior to forward the User-Agent header to the origin. Mobile clients receive the desktop version because CloudFront, by default, does not forward the User-Agent header to the origin. Without this header, the ALB and the web server behind it cannot identify the client's device type (mobile, desktop, etc.) and thus serve the incorrect content. Forwarding the User-Agent header allows the origin to differentiate between device types and respond accordingly. Adding a custom origin header named User-Agent in CloudFront origin settings is incorrect because CloudFront needs to forward the actual User-Agent header from the client, not a static custom header. Enabling IPv6 on the ALB or CloudFront is irrelevant to device-specific content delivery; it only affects network addressing.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed