January 2, 2020

Setup Cloudflare DNS for Route53 Domain

Cloudflare is a DNS level CDN. All you need to do is change your Domain name server to theirs and their will take care of lot of caching and distribution. Advantage of using cloudflare for DNS over a hosted zone in AWS is it is cheaper. But keep in mind you will miss some AWS features, but e.g. for this simple blog I don't need them.

Prequisits

Register your domain on Route53.

registered domain on route53

Signup your domain with Cloudflare

Register on the website and add your domain e.g. dennisseidel.de. Then start the configuration. Cloudflare will guide you through the process.

add domain to cloudflare

Update names server in Route53

Cloudflare will povide your with the guidelines how to implement them.

cloudfare guidelines

Next sign into Route53 and follow the guidelines above. Under Route53 und open your registered domain and update the name server.

Update name server in route53 Add new name server to route53

Then go back to cloudflare and click the recheck new button and wait for some hours until the entries are updated.

Create DNS Records to work with Netlify

Login to Netlify. Make sure your application code is available on Github, configure the deployment and then configure the domain. For this step through the UI in netlify then they will provide you with the data to configure the DNS.

netlify-dns-configuration

Click on Check DNS configuration and not the data.

netlify-dns-config-www

netlify-dns-config-alias-for-root

Cloudflare does not support native ALIAS dns records, but used dns flattening.

Create dns records in cloudflare.

cloudflare-configure-dns-cname

cloudflare-dns-record-alias

Wait for the update and check that your website is available under the new domain.

Impressum © 2019