Browser can access host via IP address but not via domain name

  • If your browser can access a host via its IP address but not via its domain name, it could be because some browsers force some top-level-domains (.dev for example) to HTTPS via preloaded HTTP Strict Transport Security (HSTS).
  • Browsers like eww are able to display pages. You can even ping, curl, git or ssh into those hosts without problems.
  • In Firefox, you can check this by disabling network.stricttransportsecurity.preloadlist in about:config: If you disable it by setting network.stricttransportsecurity.preloadlist to false, open a new tab and open your url, it will display.source
  • The solution is to configure HTTPS for your domain.