# Hosting a website on your VPS
Source: https://vpsdime.com/knowledgebase/getting-started/hosting-a-website
Last reviewed: 2026-07-02
Summary: From fresh VPS to a live site, choosing between a one-click app and a manual web server (nginx, Apache, or Caddy), pointing the domain, getting free SSL with Let's Encrypt certbot (or Caddy's automatic HTTPS), and what to check when the site won't load.

## What this is

The path from a fresh VPS to a live website: pick how you'll serve it, point the domain, and put HTTPS on it. This is the map with the key commands, each step has endless deeper tutorials (and an [AI chatbot](https://vpsdime.com/knowledgebase/support-coverage/software-and-server-management) walks through any of them patiently).

## Choose your route

- **One-click Applications (least work).** When you deploy or [reinstall](https://vpsdime.com/knowledgebase/client-area/services/reinstall-os), you can pick an Application instead of a bare OS ([how one-clicks work](https://vpsdime.com/knowledgebase/getting-started/one-click-applications)). **Coolify** in particular is a self-hosted platform that deploys sites and apps from a git repository and handles the web server and HTTPS for you, a lot of "how do I host X" ends right there.
- **A classic web server (most control).** Install **nginx** or **Apache** on a clean OS, the standard for a reason, with certbot for SSL (below). Or use **Caddy**, which is friendlier: it configures HTTPS **automatically** with no extra steps.

For a typical stack, e.g. WordPress, the recipe is web server + PHP + MariaDB, and every distro has a well-worn guide for exactly that. Update the OS first (`apt update && apt upgrade`), install the stack, and put your site files where the server expects them (conventionally under `/var/www/`, uploaded [over SFTP](https://vpsdime.com/knowledgebase/getting-started/uploading-files-sftp)).

## Point the domain

Create the A record for your domain and give it a few minutes to propagate, see [Pointing your domain](https://vpsdime.com/knowledgebase/getting-started/pointing-your-domain). Do this before requesting SSL: Let's Encrypt validates your domain by reaching your server, so DNS has to resolve first.

## Free SSL (HTTPS) with Let's Encrypt

There's no reason to pay for a standard certificate, and no reason to skip HTTPS. With nginx or Apache, **certbot** does the whole thing:

```
apt install certbot python3-certbot-nginx     # or python3-certbot-apache
certbot --nginx -d example.com -d www.example.com
```

It obtains the certificate, rewires your config for HTTPS, and sets up **automatic renewal** (certificates last 90 days; the installed timer renews them, verify with `certbot renew --dry-run`). If a certificate error ever shows up later, expiry, name mismatch, Cloudflare mode trouble, the fixes are in [Fixing SSL certificate errors](https://vpsdime.com/knowledgebase/troubleshooting/ssl-certificate-errors). And when you outgrow the quick start, other free CAs, wildcard certificates, challenge types, cipher tuning, it's all in [the complete certificate guide](https://vpsdime.com/knowledgebase/getting-started/ssl-certificates).

- **Using Caddy?** Nothing to do, it provisions and renews certificates automatically for the domains in its config.
- **Behind Cloudflare's proxy?** Your visitors get HTTPS at the edge; still put a certificate on the VPS so the Cloudflare-to-origin leg is encrypted too (certbot as above works, or Cloudflare's origin certificates). The rest of a proper Cloudflare setup, locked origin, real visitor IPs, caching, is in [Cloudflare best practices](https://vpsdime.com/knowledgebase/getting-started/cloudflare-best-practices).

## When the site won't load

Work down this list, it catches nearly every case:

1. **DNS:** does `dig +short yourdomain.com` print your VPS IP? If not, [DNS](https://vpsdime.com/knowledgebase/getting-started/pointing-your-domain) first.
2. **Is the server listening?** On the VPS: `ss -tulnp | grep -E ':80|:443'`. No listener means the web server isn't running (`systemctl status nginx`) or your app is bound to `127.0.0.1` with no reverse proxy in front.
3. **Your own firewall:** if you set up ufw and forgot the web ports, `ufw allow 80` and `ufw allow 443`. (Our [managed firewall](https://vpsdime.com/knowledgebase/client-area/services/firewall) never blocks web ports, so it's not the cause.)
4. **HTTPS works, HTTP doesn't (or vice versa):** one of the two server blocks/vhosts is missing or not redirecting, check the config certbot wrote.
5. **It worked until now and "nothing changed":** check the disk, a [full disk](https://vpsdime.com/knowledgebase/troubleshooting/disk-full) silently takes down databases and apps, and it's a ten-second `df -h` to rule out.
6. **Seeing a 502, 503, or 504 instead of nothing?** That's your web server reporting that the app behind it didn't answer, a different diagnosis with [its own guide](https://vpsdime.com/knowledgebase/troubleshooting/502-503-errors).

## After it's live

Two habits make the site durable: [secure the VPS](https://vpsdime.com/knowledgebase/getting-started/securing-your-vps) (the site's admin panel and database included) and [back it up](https://vpsdime.com/knowledgebase/getting-started/backing-up-your-vps), a nightly database dump plus off-site copies, so a bad update or a compromise is an inconvenience rather than a disaster.

## Still need help?

You can [open a support ticket](https://vpsdime.com/open-ticket/). So we can help on the first reply, it's worth mentioning:

- the VPS and the domain,
- what you're serving it with (nginx, Apache, Caddy, Coolify),
- what exactly fails (DNS, connection, certificate error), with the message.

## Related questions

- "How do I host a website on my VPS?"
- "How do I get a free SSL certificate?"
- "How do I set up HTTPS with Let's Encrypt?"
- "Why isn't my website loading?"
- "Can I run WordPress on my VPS?"
- "Do your one-click apps include a website platform?"
