Cloudflare + AWS route 53 combined to handle records

10,145

okay, after tinkering around. I finally got it working! thanks for everyone for their help. If anyone else is in the same situation as me. Here is what you have to do.

I bought the domain from Godaddy, so under the nameserver, I used the name server from Cloudflare(there should only be 2 from cloudflare)

Cloudflare manages all of my services, but I only wanted one subdomain(firmware.mywebsite.com) to be directed to amazon route53, and leave the others where they are.

  1. Create a hosted zone in your amazon route 53, of your domain, should be *.yourwebsite.come

in this hosted zone, there should be 2 entries by default, one is the SOA record and the other one is sub-entries of Name servers from amazon.

  1. Add the subdomain you want to be controlled by route 53 on cloudflare under the NS field.

so for example, you wanted firmware.mywebsite.com to be controlled via route 53,

add that in as the first field into the cloudflare NS registry, the second field is the name server from amazon, you need to add ALL 4 of them into cloud flare.

  1. Add the subdomain entry on the route 53 side, so it would be firmware.mywebsite.com, then select the type of record(A, cname, etc),and where you want it redirect to.

  2. set the TTL to short time(2min) to see the propagation.

Everything should be setup!

If you go this route, for every subdomain you wanted to be controlled by route53, there needs to be 4x entry for that subdomain on cloudflare.

Hope this be useful for someone else in situation!

Share:
10,145

Related videos on Youtube

John
Author by

John

Updated on September 18, 2022

Comments

  • John
    John over 1 year

    I bought my domain from Godaddy,

    I use cloudflare for most of my services, so i added the nameserver to my godaddy domain configuration.

    So lets say I have

    api.mydomain.com firmware.mydomain.com forum.mydomain.com

    as CNAME records pointed to my AWS Load balancer.

    However, I want to use firmware.mydomain.com to be on route 53, specifically for its geolocation routing and latency routing, But I want to have my remaining 2 services to be on cloudflare

    Now When I added amazon route53 name servers to my godaddy account. A bunch of my services that was registered on cloudflare started to go down and become unreachable.

    I removed those nameserver entries from godaddy, and everything works again.

    Now my questions is.

    Why did this happen?

    If I add nameserver from route53, does it have to be a duplicate of all of the services on cloudflare for it to work?

    Thanks

    • ceejayoz
      ceejayoz about 7 years
      Delegate just the firmware.mydomain.com subdomain to Route53 via NS records in CloudFlare.
    • John
      John about 7 years
      there is 4 entries in the route53 hosted zone, would I delegate firmware to those nameserver?
    • ceejayoz
      ceejayoz about 7 years
      Yes, you would.
    • Tim
      Tim about 7 years
      @TylerLiu If you've found a solution please post it in the answer box below, so others can learn from your experience
    • John
      John about 7 years
      thanks @ceejayoz, I got a solution. posted the solution below! thanks!
  • Ivan Milisavljevic
    Ivan Milisavljevic over 6 years
    One thing thought, you cant create *.domain zones, it has to be root domain