0

I have an EC2 instance running with following details - t2.micro - virtualization type = hvm - Elastic IP assigned = 54-152-108-137 - Public DNS assigned = ec2-54-152-108-137.compute-1.amazonaws.com - Security group created with following rules/ports enabled 22 tcp 0.0.0.0/0 ✔ 80 tcp 0.0.0.0/0 ✔ All All 0.0.0.0/0 ✔ 53 udp 0.0.0.0/0 ✔ 443 tcp 0.0.0.0/0 ✔

I access the url with public DNS It works fine.

I access the url with public IP. It works fine.

But, I want to access through the domain name which I brought from Amazon route 53. My domain name is einfachmachen dot ch

Now, I wanted to map this domain to my EC2 running instance I did the following.

  1. Created a Hosted Zone. (as the one originally created while buying the domain got deleted or so)
  2. Choose Domain Name as my registered domain name = einfachmachen.ch
  3. Type = Private Hosted Zone and chose the VPC id listed in my EC2 console (vpc-24d2a641)
  4. This got created with 2 default record. One with type NS and another with type SOA
  5. Updated the NS record set with the NS addresses from my domain (copied the NS addresses from registered domains in AWS Route 53)
  6. Created a A record for einfachmachen.ch with IPv4 Address and Value = 54.152.108.137
  7. Created a A record for www.einfachmachen.ch with CNAME and Value = ec2-54-152-108-137.compute-1.amazonaws.com

After this, I checked the url with domain name .. Nothing works.

I get the error in browser as "This page can’t be displayed".

I checked if it works with static web pages. I created 2 Buckets in S3 and provided the A record values as the end-points from S3 buckets. Then it works.

What is wrong in Ec2 and domain linking?

2

A Private Hosted Zone is used to resolve DNS names within a VPC.

Use a public hosted zone if you want to resolve DNS names on the Internet.

See: Working with Private Hosted Zones

  • I tried with public hosted zone as well. but, no luck. But, when I try the public hosted zone for S3 static site it works fine. the same domain name gets resolved. – tangouser Feb 2 '15 at 20:56
  • the output of 'dig +recurse +trace www.einfachmachen.ch any': – tangouser Feb 3 '15 at 5:25
  • ;; Received 434 bytes from 192.58.128.30#53(192.58.128.30) in 23 ms einfachmachen.ch. 3600 IN NS ns-1536.awsdns-00.co.uk. einfachmachen.ch. 3600 IN NS ns-1024.awsdns-00.org. einfachmachen.ch. 3600 IN NS ns-0.awsdns-00.com. einfachmachen.ch. 3600 IN NS ns-512.awsdns-00.net. ;; Received 176 bytes from 194.42.48.120#53(194.42.48.120) in 97 ms ;; Received 38 bytes from 205.251.192.0#53(205.251.192.0) in 6 ms – tangouser Feb 3 '15 at 5:27
  • Well, it seems to point to your Route 53 configuration, since NSLOOKUP doesn't resolve to an IP address for either of those DNS entries. Start by experimenting with your CNAME record (www.einfachmachen.ch), since NSLOOKUP should resolve it to einfachmachen.ch -- currently it doesn't. Make sure you're using a Public hosted zone. Try resolving it from an EC2 instance to avoid propogation delays. You could even try adding another sub-domain just for testing purposes (eg test.einfachmachen.ch) – John Rotenstein Feb 3 '15 at 20:25
  • I recreated the public hosted Zone and updated the NS record to 53 hosted Zone. It works now. Thanks – tangouser Feb 6 '15 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.