0

Freelance web developer here seeking some advice...

I am working with a client who wants to launch new website. Their registrar is FastHosts, which points to Sitegrounds namesevers (their DNS host).

I've built a new site which needs to run in a Node.js environment, but that isn't compatible with Sitegrounds hosting. So, I spun up an AWS EC2 server, copied it's public IP and replaced the A Record in Siteground to the one provided by EC2.

However, the website just isn't loading when you visit their root domain. It's getting a 'the site cannot be reached - too long to respond' error.

If I visit the public IP address of the EC2 instance in the browser, the website loads.

We also cannot get rid of Siteground, as it hosts various 'subdomain-ed' websites.

I'm completely stuck. Have done this right? Is what I'm trying to achieve even possible?

Any guidance would be much appreciated.

Jake
  • 3
  • 1

1 Answers1

0

'public IP' on an EC2 might not necessarily be a publicly accessible IP address. This is generally called the "Elastic IP" in AWS-speak. Is that what you are using?

You mentioned being able to access the website using the "public" IP.
Were you trying this from a computer within your network (or VPN'd) or external?

If you replaced the IP in an existing DNS A record, it might just be a DNS propagation issue. Use this to check propagation: https://www.whatsmydns.net/

I'm not familiar with FastHost or Sitegrounds, but if they are functioning as a web proxy, you may have to add the new URL/IP to some whitelist.

PSn00b
  • 59
  • 2
  • Thanks for the response. Yes, to clarify I'm using the Elastic IP. I'm able to access the website with + without a VPN (if that's what you're asking?). Have been keeping an eye on propagation over the past few hours and appears as if it's all up to date. Is my initial approach correct? – Jake Mar 25 '20 at 23:12
  • Yes, the approach seems correct. It sounds like there is just a minor issue in implementation. Are you using a load balancer or proxy? Is the website configured with the same URL address you're using in DNS (e.g. www.fubar.com)? Is the website configured to listen on the standard HTTP/HTTPS port? Are you using HTTPS, but the site is only listening on HTTP (or vice-versa)? Can you telnet to the IP address on port 80/443 or whatever you've defined? Is that protocol/port allowed inbound on the AWS security group attached to that EC2 instance? – PSn00b Mar 25 '20 at 23:39
  • It looks like I've now got a working version of the site! I've tweaked some settings in the AWS security group and attempted to visit the site again, prefixing the url with www. this time around and it worked. Doesn't without the www. though, but I'm sure I can figure out a solution to that. Thank you so much, I'd have never have fixed it without your support. – Jake Mar 26 '20 at 00:18
  • Just be aware that with elastic if the site is rebuilt or scaled, it will get a new elastic IP – Rowan Hawkins Mar 26 '20 at 18:52