So assume company name is widget

I have elastic beanstalk instance at widget.elasticbeanstalk.com I have a domain name widget.com under Route53 control I have a CNAME record direct.widget.com pointing to widget.elasticbeanstalk.com I have another CNAME record search.widget.com also pointing to widget.elasticbeanstalk.com

This works fine I can access my eb instance via search.widget.com and direct.widget.com

I then setup Cloudfront to use origin direct.widget.com with alternate domain name of cache.widget.com, and I configure another CNAME on Route53 from cache.widget.com to my cloudfront instance (lets call this drvevtora80lk.cloudfront.net)

This also works fine I can access my Cloudfront instance via cache.widget.com and this will recognise already cached data and work or go to direct.widget.com as necessary.

But my users are using search.widget.com and I want them to now go via Cloudfront rather than directly to the server. So I now modify the search.widget.com CNAME to point to drvevtora80lk.cloudfront.net and wait a while for changes to propogate.

But now using search.widget.com gives me a Cloudfront error

The cache.widget.com and direct.widget.com continue to work fine, what am I doing wrong ?

  • I do a dig for search .widget.com and see search.widget.com. 14400 IN A an A record.
    – closetnoc
    Feb 22, 2015 at 17:03
  • widget was just an example , actually if you want the real names replace widget with jthinkws Feb 22, 2015 at 17:11
  • search.jthinkws.com does a 302 redirect to jthink.net. Is that what you intended? You can check any .htaccess (or other similar mechanism) to ensure that you are doing what you want.
    – closetnoc
    Feb 22, 2015 at 17:19
  • Yes (thats defined on EB) but it only does that if don't pass a query Feb 22, 2015 at 17:21
  • e.g search.jthinkws.com/?type=release&query=reid:44 AND src:2 works and cache.jthinkws.com/?type=release&query=reid:44 AND src:2 works but if I set search.jthinkws.com to go to Cloudfront it gave error Feb 22, 2015 at 17:23

1 Answer 1


The problem was that although I modified the search.widget.com CNAME to point to drvevtora80lk.cloudfront.net I forgot to add search.widget.com as an alternate name within my CloudFront distribution, added that and it now works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.