0

Steps I did:

I've Debian VPS and I've bought domain "marek-prusa.dev" on Google Domains.

Steps how I configured my webserver with domain name "marek-prusa.dev".

I've created marek-prusa.dev file in /etc/nginx/sites-available/.

Then I've put this configuration in marek-prusa.dev file:

server {
    listen 80;
    server_name marek-prusa.dev;
    root /var/www/marek-prusa.dev;
    index index.html;
}

In /var/www/marek-prusa.dev I've created index.html file with some content.

I've created symlink by sudo ln -s /etc/nginx/sites-available/marek-prusa.dev /etc/nginx/sites-enabled/

And then I restarted nginx by sudo systemctl restart nginx

After that I've created A record in Google Domains:

@    A    3600    89.221.218.233

The problem:

I've checked if my DNS was propagated and it is. Google Domains are showing me website preview with exact content I've put inside /var/www/marek-prusa.dev/index.html. But if I will reach directly http://marek-prusa.dev in browser, it will throw ERR_TIMED_OUT error.

I was also checking my iptables for port 80 and it also look ok:

 0     0 ACCEPT     tcp  --  *      *       89.221.218.233       0.0.0.0/0            tcp dpt:80
 2598  132K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 
/* 'dapp_Nginx%20HTTP' */

1 Answers1

0

The problem was that I did not configured https for my website. And server was forwarding http to https as @Jaromanda X said.

So I've generated ssl certificates by certbot and that solved the problem.

  • As your registrar should have explained to you when you registered the domain, as `.dev` is a Google TLD and Google decided to put all its TLDs in the HSTS preloading list, this has the consequence that all major browsers will only do HTTPS queries to such names, and never HTTP ones by default. – Patrick Mevzek Jan 28 '23 at 18:45