9

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?

Shamoon
  • 901
  • 4
  • 14
  • 22

2 Answers2

4

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.

xxdesmus
  • 291
  • 2
  • 8
  • 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 03 '13 at 20:16
  • 1
    The above linked repo has disappeared. – Vic Jul 10 '15 at 04:35
  • 2
    @vic we introduced CNAME flattening. The ELB updated isn't needed any longer. See: http://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/ – xxdesmus Jul 10 '15 at 15:40
  • You're a good man. – Vic Jul 13 '15 at 02:03
1

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.

Brian Knight
  • 1,165
  • 2
  • 8
  • 17