Skip to content

Instantly share code, notes, and snippets.

@nikkaroraa
Created September 18, 2020 13:53
Show Gist options
  • Save nikkaroraa/b499941e5dbf508b40a019874b5883b2 to your computer and use it in GitHub Desktop.
Save nikkaroraa/b499941e5dbf508b40a019874b5883b2 to your computer and use it in GitHub Desktop.
How to use Route 53 on top of Cloudflare

How to use AWS's Route 53 on top of Cloudflare?

Configure Route 53

  • Create a Public Hosted Zone in Route 53
  • Create a simple record for the domain you want, and where do you want to target that domain to?
  • By now, you should have 3 records under the hosted zone that you just created
    • NS
    • SOA
    • A
  • Copy all the 4 nameservers associated with this "Hosted Zone". You should be able to find those under Hosted zone details

Configure Cloudflare

  • Now we want to direct the traffic coming to Cloudflare (for a particular subdomain) to AWS's Route 53
  • Add all the 4 nameservers to the DNS settings in Cloudflare
    • Type: NS
    • Name: api in case the subdomain is api.example.com
    • Content: Each of the nameservers that you just copied from the Route 53 Hosted zone
    • TTL: Auto
    • Proxy Status: DNS only

That's about it. Just wait for a few mins and you should be able to access with your own subdomain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment