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?
Asked
Active
Viewed 8,235 times
9
Shamoon
- 901
- 4
- 14
- 22
-
1Congratulations, you've discovered one of the reasons why web sites should use `www.` – Michael Hampton Apr 25 '13 at 16:56
-
I know this is late to the party, but I'm curious about the reasons why websites should use www. @MichaelHampton – Rystraum Aug 12 '15 at 04:10
-
1@Rystraum Not coincidentally, [I have a web site about that very subject](http://www.yes-www.org/). – Michael Hampton Aug 12 '15 at 04:22
2 Answers
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
-
-
@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
-
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
-
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