I'm trying to get CloudFlare to sit in front of Route 53. I have my main web server on an ELB (which doesn't have an IP address). CloudFlare needs an IP for an A record, so how can I accomplish this?


Disclosure: I work at CloudFlare.

If you happen to have a server with Python and dig installed, you can set this on a cron job: https://github.com/bundan/CloudFlare-ELB-Updater and basically flatten the CNAME at the root to the associated A records -- therefore addressing the CNAME at the root issues.

  • How often should the cron job run? – Shamoon Apr 29 '13 at 13:51
  • @Shamoon really as often as you'd like. ELBs don't change all that often, but when they do you'll want the newest IPs in place as quickly as possible. DNS changes within your CloudFlare account push out across our entire network in under 1 minute so I'd recommend going with a value such as every minute for the CRON job. The script should not consume much in the way of resources so it shouldn't impact the performance of your server even if running it that often. – xxdesmus May 3 '13 at 20:16
  • 1
    The above linked repo has disappeared. – Vic Jul 10 '15 at 4:35
  • 2
    @vic we introduced CNAME flattening. The ELB updated isn't needed any longer. See: blog.cloudflare.com/… – xxdesmus Jul 10 '15 at 15:40
  • You're a good man. – Vic Jul 13 '15 at 2:03

You can attempt a manual CNAME setup. Here's a link to the relevant article in the CloudFlare knowledge base.

According to CloudFlare support, the setup with a CNAME at the root domain in Route 53 is less than ideal, but they offer some remediation.

I know this is less than satisfying for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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