Domain pointing but not loading my site

I bought a domain from namecheap, changed it nameservers to digitalocean droplet’s nameservers.

Digitalocean domain records look like this:

  1. A domain.tld IP TTL
  2. A www.domain.tld IP TTL
  3. A sub1.domain.tld IP TTL
  4. A sub2.domain.tld IP TTL
  5. A *.subdomain.tld IP TTL
  6. ns ns.digitalocean
  7. ns ns.digitalocean
  8. ns ns.digitalocean

Nginx Proxy Manager looks like this:

  1. domain.tld server-ip:80 no-ssl
  2. www.domain.tld server-ip:80 no-ssl
  3. sub1.domain.tld server-ip:port SSL
  4. sub2.domain.tld server-ip:port SSL

Issue
Whenever I load the domain.tld or www.domain.tld with http it cant load the nginx welcome page.
and when I remove both domains from nginx proxy manager, the welcome page suddenly starts to load easily. Another case is if I use certificates with both domains, they both open to 502 bad gateway or sometimes with 400 but the browser shows the https padlock.

Hugo server
Now if I run hugo server -p port hugo gives me http ://localhost:port, here as I understand localhost is where I need to put the ip address of my server to access hugo site from a browser.

Ports
I have also allowed required ports through the server firewall and also the DO’s firewall.

Both domain still cant load but all the other subdomains are working properly with https too.

Is it something that domain will take time because of the propogation ?
Or is it something with my setup ?

Also if I do nmap scan on server with hugo port, nmap shows port closed with unknown service.

All ports are set, records are set, nginx proxy manager is set but still both domains cant load the hugo site.

Get your DNS, NGINX, and certificates working first. Place an index.html in the root of your virtual host to test that everything is working.

I’ve read your post several times, and it sounds like you might be trying to use Hugo’s built-in server for your production site. If that’s true, don’t do that. The built-in server is for development only.

Once you have the basics working, come back here to ask Hugo-specific questions.

All was set alright except me running hugo server,

now I ran with hugo server --bind 0.0.0.0 -D

and all domains are working now.