Search code examples
reactjsamazon-web-servicesdnscloudflare

AWS EC2 with custom domain


I have an AWS EC2 instance running a react application. I want to use my custom domain which i bought from cloudflare, and have tried several things (mainley configuring route 53 to use the NS servers from cloudflare) but am still lost.

configuring route 53 to use the NS servers from cloudflare


Solution

  • You do not need to use Route53 for attaching a custom domain to the EC2 instance. Attach an Elastic IP to the EC2 instance first. Then simply point the A record of the domain in cloudflare to this elastic IP. Since Cloudflare gives free SSL, the domain will be automatically be https one.

    If you want to use Route53, then you have to created a hosted zone in Route53, and then point the domain to the nameservers provided by the hosted zone.Then you will be able to create A record for the domain in the hosted zone.