4

I have recently set up an AWS S3 bucket for my site's static content, along w/ a CloudFront distribution for my CDN. I have this working using a sub-domain.

However, after running YSlow, I realized that cookie data is still getting passed to my subdomain CDN (4 cookies), which I suspect are cookies from the Google Adsense ads on my root domain. So I'd like to set up another dedicated root domain for my CDN.

My question is, if this new root domain is dedicated to just my CDN, what should I set up as the IP address for the root A record? Obviously, the point of a CDN is to allow it to determine the ultimate destination IP based on location.

Or, does it not even matter what this IP is, as it will be driven by the CDN anyway?

2

1 Answer 1

2

First, you have control on the behavior of your CloudFront distribution regarding cookies. You can disable cookies forward altogether or whitelist the ones that you need.

For the DNS, you shouldn't provide an IP as the actual serving IP will be determine in run time for each user based on his location. You need to define the CNAME in your distribution settings: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html

Note that the DNS protocol does not allow you to create a CNAME record for the top node of a DNS namespace, also known as the zone apex.

1
  • 1
    I think his point about cookies is that he doesn't want the client to include them with the request, which the CF cookie forwarding/whitelisting won't affect. Jan 23, 2013 at 14:31

Your Answer

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

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