Skip to main content
When a website on your VPS doesn’t load, check four things in order: the web server (Nginx or Apache) is running and its configuration is valid (sudo nginx -t), the firewall allows ports 80 and 443, the domain’s DNS points to your server’s IP, and the web server answers locally (curl -I http://127.0.0.1). The browser’s error message tells you where to start.

Before you start

  • Connect with SSH. If SSH doesn’t work either, the server itself is the problem: see SSH connection timed out.
  • Know your server’s public IP. It is on your server page; the examples use 203.0.113.10.
  • Commands use sudo. As root, leave it out.

Which error do you see?

Cause 1: The web server isn’t running

Check:
A broken configuration stops the server from starting. nginx -t names the file and line:
Fix: correct that line until the test says syntax is ok (Nginx) or Syntax OK (Apache), then start the service, for example:
If the log says Address already in use, another program holds port 80 or 443. Find it with sudo ss -tlnp | grep -E ':80 |:443 '.

Cause 2: The firewall blocks ports 80 and 443

Check and fix:
For Apache, use sudo ufw allow 'Apache Full'. Both open TCP ports 80 and 443.
Also check the rules in our Firewall panel if you use it. Test from outside with check if a port is open from outside.

Cause 3: The domain doesn’t point to your server

Check from your computer or the server:
If dig is missing, install bind9-dnsutils (Ubuntu/Debian) or bind-utils (AlmaLinux/Rocky). Both lines should print 203.0.113.10. No output means there is no A record; a different IP means the record points elsewhere. Fix: set A records for example.com and www to your server’s IP at your DNS provider. Changes can take from a few minutes to the record’s TTL to reach everyone. See point a domain to your server. Test the site by IP in the meantime: http://203.0.113.10.

Cause 4: The server answers locally but not for your domain

Check on the server:
HTTP/1.1 200 OK (or a 301 redirect) means the web server works. If ss shows 127.0.0.1:80 instead of 0.0.0.0:80 or *:80, it only listens locally: fix the listen (Nginx) or Listen (Apache) line. If the default page appears instead of your site, server_name or ServerName doesn’t match your domain. See set up Nginx server blocks. On AlmaLinux and Rocky, files copied in from elsewhere can have the wrong SELinux label and give 403 Forbidden. Run sudo restorecon -Rv /var/www and see SELinux on AlmaLinux and Rocky.

Cause 5: Only HTTPS fails

If http:// works but https:// doesn’t, port 443 isn’t open, nothing listens on it, or the certificate is missing or expired. Check:
Fix: open port 443 (Cause 2) and issue or renew the certificate with Certbot.

How to check it worked

From your computer:

Frequently asked questions

The site works by IP but not by domain. Why?

DNS isn’t pointing to your server yet, or the server block doesn’t list the domain. Check Cause 3, then Cause 4.

The site works for me but not for others. Why?

Your computer may still use an old DNS answer, or a firewall rule allows only your IP. Test from a phone on mobile data.

It loaded yesterday and stopped today. What changed?

Look for an expired certificate, a full disk (no space left on device), or a service killed for lack of memory (OOM killer).

VPS and dedicated server guides

Every guide in this section.

Fix 502 Bad Gateway

When Nginx can’t reach your app.

Point a domain to your server

Set A and AAAA records.

Install Nginx

A clean, working setup.

Free SSL with Certbot

HTTPS for your domain.

Checked against the official nginx documentation, the Apache HTTP Server documentation and Ubuntu’s firewall documentation on 4 November 2026; nginx -t (valid and broken config), apache2ctl configtest, the curl and ss checks against a test Nginx instance and the UFW profiles (dry run) were tested on Ubuntu 24.04 LTS (nginx 1.24, Apache 2.4.58). The firewalld and SELinux steps were not tested.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026