1

I am hosting my website on Amazon's EC2 with an elastic IP address. My domain is purchased through Google Domains.

When I go to www.example.com, the website loads.

If I go to example.com, it doesn't load.

Is there a way to change my configuration to have both work?

enter image description here

jape
  • 2,861
  • 2
  • 26
  • 58

1 Answers1

0

You should configure an A record for example.com on Google DNS to point to the Elastic IP address.

You should then configure an additional CNAME record for www.example.com to point to example.com.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470