amazon-web-servicesamazon-ec2dnssubdomainbluehost

Point the subdomain to AWS and root to bluehost


I have a domain example.com that is a Wordpress website and is hosted in Bluehost. Parallel to that, I have an app that I've hosted on aws ec2. I want the subdomain app.example.com to point to the aws ec2 isntance. How is that possible?

I've tried via aws route 52, in the hosted zone I've created A,NS,SOA,CNAME type records for the root which I pointed to Bluehost IPv4 and also for the subdomain I've created a CNAME record that points to aws Public DNS (IPv4). In the Bluehost, I've edited the subdomain A records on which I set the IPv4 of aws ec2.


Solution

  • I think you have your terms mixed up.

    a subdomain is a completely separate domain, e.g. subdomain.example.com, which would contains separate hosts - www.subdomain.example.com / ftp.subdomain.example.com To do this, create the subdomain in Route53 and fill in the NS records that you are provided with.

    What you probably want though is just a host record. Create a new A record, so app.example.com, and use the IP address of the ec2 instance. Then do the same for the www.example.com record using the wordpress ip address.