-1

I added the following records to my google domain

Going to the IP directly works but the url does not I have the following in my NGINX config:

server {
    root /home/ubuntu/public_html;
    location / {
        allow all;
    }

}

The A record is the IP Do I need to configure anything on AWS? Do I need to use Route53?

samsun96
  • 308
  • 3
  • 13
  • When you hit the Elastic IP in the browser, Is it opening or not? – Deependra Dangal Jul 01 '19 at 02:29
  • @DeependraDangal yes it opens – samsun96 Jul 01 '19 at 02:41
  • run these three command and edit your question with the results if any errors are reported in the responses. replace example.com with your domain name. `curl -i http://ip-address` and `curl -i http://example.com` and `curl -i http://www.example.com`. There are DNS tools on the Internet to help you figure this out. I use MxToolbox: https://mxtoolbox.com/ – John Hanley Jul 01 '19 at 04:46
  • @JohnHanley all 3 worked and returned the valid html – samsun96 Jul 01 '19 at 05:39
  • Then what problem are you still having? – John Hanley Jul 01 '19 at 05:41
  • @JohnHanley I answered my own question – samsun96 Jul 01 '19 at 23:39
  • The domain ".dev" allows HTTP traffic. If your actual domain is implementing HSTS then you must implement HTTPS as browsers will automatically redirect silently. https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security – John Hanley Jul 02 '19 at 00:51
  • If you give the true name without useless obfuscation people could have helped you better and faster... – Patrick Mevzek Jul 03 '19 at 06:07

1 Answers1

0

I figured it out! .dev doesn't seem to allow http traffic (port 80) so I had to setup a cert before I was able to see the site. What I thought was a DNS issue was actually a cert issue. It's just extremely unclear because no browsers showed me the "not secure" page

samsun96
  • 308
  • 3
  • 13
  • This should have been explained by your registrar when you registered the `dev` domain: Google added all its TLDs (so `dev`, `app`, the future `new`, etc...) to the HSTS Preloading list, which means browsers will only attempt to connect to port 443 (HTTPS) and not port 80 (HTTP). For longer explanation see my other reply at https://stackoverflow.com/a/50258651/6368697 – Patrick Mevzek Jul 03 '19 at 06:08
  • I'm having the same problem, could you please tell me how to set up a cert? .dev domain is a headache, I shouldn't have bought it. – user13670138 Mar 22 '21 at 23:40
  • you need to expose port 443 on the server and setup a cert (like letsencrypt) and setup https on the server (like in nginx for example). That will let you go to `https://website.dev` rather than `http://website.dev` which won't work – samsun96 Mar 25 '21 at 11:18