Amazon AWS Subdomains with EC2 Instance and Elastic IP - Step by Step Setup Review and Help

Hi all,

I have spent the past 2 days reading and re-reading all the posts here that mention “sub-domain” and I confess that despite the quality of the answers, the information is too fragmented for me to put it together and apply to my case.

The steps below are the ones I followed to set up with an EC2 Wordpress instance using an elastic IP and with an EC2 TikiWiki instance using another elastic IP. Many thanks in advance for your kind guidance and corrections please:

  1. I have set up a hosted zone for “www.example-site…com” in Route 53 and set up the non-www address “example-site…com” as an alias to it. (I prefer the www address to be the default). I allowed it to propagate and although the web browser would not allow me to enter using the domain name (using the IP was fine) due to a lack of a certificate, I could see that it was working fine.

  2. I then registered “example-site…com” in Cloudflare and immediately I substituted the original Amazon nameservers with Cloudflares’ own nameservers in Amazon’s Route 53.

  3. Perhaps in the wrong order, I then created an EC2 instance of WordPress by Bitnami and proceeded to create an elastic IP and assigned it to this Wordpress instance.

  4. I went to Route 53 and changed the A record for “www.example-site…com” to the elastic IP assigned to the Wordpress EC2 instance. No other changes made.

  5. I had several variations of the domain name, e.g. examplesite…com, example-site…org, and I created an S3 bucket for each domain name variation split between the “www” and “non-www” versions of these names (e.g.: a bucket called “www.example-site…org” and another bucket called “example-site…org”, etc…). No hosted zones were created for them. Each bucket’s properties > static hosting were set as “redirect” to “www.example-site…com” with the protocol (http/https) left in blank (is this correct?). DNS still not propagated and Cloudflare still waiting for the nameservers update.

  6. Then I created a new EC2 instance of TikiWiki and got a new elastic IP which I assigned to this new instance.

  7. I went back to Route 53 and created a new hosted zone for the Wiki sub-domain, wiki.example-site…com. Amazon created the nameservers and I added an “A” record with the elastic IP assigned to the TikiWiki EC2 instance.

  8. Still in Route 53, I went into the records of hosted zone “example-site…com” and added a nameserver (NS) record named “wiki.example-site…com” copying the values of the nameservers Amazon assigned to hosted zone “wiki.example-site…com”. From here I don’t know how to proceed and need your patient help please.

  9. I am still waiting for the Cloudflare’s nameservers to propagate as my TTL was set to 48 hours and just now I changed it to 5 mins, Once everything is set up, I will up it back to 24 hours.

Before I leave, I would like to register my immense admiration for the great service provided by Cloudflare and how they have made it so easy and visually pleasing. As a UX professional, CloudFlare became a case I will use to illustrate how a heavily technical service and product can still be pleasing and user-friendly.

Many thanks for your help!