The fastest, cheapest way to put a website online in 2026 is a three-piece stack that anyone can put together in about thirty minutes: register a domain at any reputable registrar (we use GoDaddy as the example here, but Namecheap, Porkbun or Gandi work the same way), point its DNS at Cloudflare's free plan to get DNS, free SSL and free DDoS protection in one place, and run the actual web server on a small VPS. This article walks through every step, including the commands for the four most common stacks (static HTML, PHP, Python, Node.js).
What you need (and what it costs)
| Domain registrar (GoDaddy, Namecheap, Porkbun, Gandi …) | ~$10–15 / year for a .com |
| DNS + CDN + SSL + DDoS — Cloudflare Free plan | Free, no credit card required |
| VPS — NetGrid Host Starter plan | €2.98 / month, deploys in ~60 seconds |
| Total monthly cost | ~€2/mo for the server, ~$1/mo amortised for the domain |
Step 1 — register a domain
Sign up at GoDaddy (or any other ICANN-accredited registrar), search for the name you want, pay. The basic registration is all you need.
Step 2 — sign up at Cloudflare and add the site
Create a free account at cloudflare.com, then:
- Click Add a site in the dashboard.
- Enter your domain (e.g. `example.com`) without https:// or www.
- Pick the Free plan (it's the bottom option, you may need to scroll).
- Cloudflare scans existing DNS records (usually finds nothing for a brand-new domain) and gives you two nameservers that look like `marek.ns.cloudflare.com` and `tessa.ns.cloudflare.com`. The exact pair is unique to your account — write them down.
Step 3 — point GoDaddy at Cloudflare's nameservers
- GoDaddy → My Products → next to your domain click DNS → scroll to Nameservers → Change.
- Choose I'll use my own nameservers.
- Delete GoDaddy's defaults, paste the two Cloudflare nameservers from Step 2.
- Save. GoDaddy may ask you to confirm by email.
- Back in Cloudflare, click Done, check nameservers.
Step 4 — order a VPS at NetGrid Host
On netgrid.host pick a plan (the Starter at €2.98/mo is enough for the vast majority of small websites), pick a location close to your audience, pick an OS — we recommend Ubuntu 24.04 LTS for web servers (long-term support, every guide on the internet works on it). The VPS is built and powered on in roughly 60 seconds. You'll receive an email with the public IP, the root password, and the SSH port.
Step 5 — point Cloudflare at your VPS (the A record)
- Cloudflare → your domain → DNS → Records → Add record.
- Type: A.
- Name: `@` (this represents the bare domain, e.g. `example.com`).
- IPv4 address: the public IP from your NetGrid Host welcome email.
- Proxy status: Proxied (the orange cloud). This is the magic — it routes traffic through Cloudflare's network, which gives you the free SSL and DDoS protection. If you set this to DNS only (grey cloud), Cloudflare just resolves DNS and gets out of the way — you lose the CDN, SSL and DDoS features.
- TTL: Auto.
- Save.
Then add a record for `www` so both `example.com` and `www.example.com` work:
- Add record → Type CNAME.
- Name: `www`.
- Target: `example.com` (your bare domain).
- Proxy status: Proxied.
- Save.
Step 6 — turn on free SSL (HTTPS)
Cloudflare → SSL/TLS → Overview → choose an SSL/TLS encryption mode:
| Off | Disables HTTPS entirely. Don't use. |
| Flexible | HTTPS between visitor and Cloudflare; HTTP between Cloudflare and your VPS. Quickest to get working but the back-half is unencrypted. OK for the first 10 minutes, then move up. |
| Full | HTTPS end-to-end, but Cloudflare doesn't validate the cert on your VPS — a self-signed cert is accepted. Good middle ground. |
| Full (strict) ★ | HTTPS end-to-end, Cloudflare validates the cert on your VPS. The recommended target. Use Cloudflare's free Origin Certificate (see Step 9) to get there in 5 minutes. |
Step 7 — free DDoS protection (already on)
There is no "enable DDoS" button — it's automatically active the moment your DNS is Proxied through Cloudflare. The free plan absorbs L3/L4 volumetric attacks on the order of tens of Gbps without you doing anything. Sustained large-scale L7 attacks may need a paid plan, but for typical small/medium sites the free tier is genuinely enough.
Step 8 — set up the actual web server on the VPS
SSH in (use the IP, port and root password from the welcome email):
ssh -p <PORT> root@<YOUR-VPS-IP>From here it depends on what kind of site you're hosting. Pick the tab that matches your stack — install commands and a working nginx config for each:
Static HTML / JS / CSS site
sudo apt update && sudo apt install -y nginx
sudo rm /etc/nginx/sites-enabled/default
# Put your site files here:
sudo mkdir -p /var/www/example.com
echo '<h1>It works!</h1>' | sudo tee /var/www/example.com/index.html
sudo chown -R www-data:www-data /var/www/example.comMinimal nginx config — save as `/etc/nginx/sites-available/example.com.conf` (Debian) or `/etc/nginx/conf.d/example.com.conf` (RHEL):
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com www.example.com;
root /var/www/example.com;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}# Debian/Ubuntu only — enable the site:
sudo ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/
# Both — test and reload:
sudo nginx -t && sudo systemctl reload nginxPHP site (LEMP stack)
sudo apt install -y nginx php-fpm php-mysql mariadb-server
sudo systemctl enable --now nginx php8.3-fpm mariadb
sudo mkdir -p /var/www/example.com
echo '<?php phpinfo();' | sudo tee /var/www/example.com/index.php
sudo chown -R www-data:www-data /var/www/example.comnginx config that hands `.php` files to PHP-FPM:
server {
listen 80;
server_name example.com www.example.com;
root /var/www/example.com;
index index.php index.html;
location / { try_files $uri $uri/ /index.php?$args; }
location ~ \.php$ {
include fastcgi_params;
# Adjust socket path if your distro/PHP version differs:
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}Python site (gunicorn + nginx reverse proxy)
sudo apt install -y nginx python3-venv python3-pip
sudo mkdir -p /var/www/example.com
sudo chown -R $USER:$USER /var/www/example.com
cd /var/www/example.com
python3 -m venv venv
source venv/bin/activate
pip install gunicorn flask # or django, fastapi, etc.Run gunicorn under systemd. Save as `/etc/systemd/system/example.service`:
[Unit]
Description=example.com gunicorn
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/example.com
Environment="PATH=/var/www/example.com/venv/bin"
ExecStart=/var/www/example.com/venv/bin/gunicorn --workers 3 --bind 127.0.0.1:8000 app:app
Restart=always
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable --now example
sudo systemctl status examplenginx as reverse proxy in front of gunicorn:
server {
listen 80;
server_name example.com www.example.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Node.js site (pm2 + nginx reverse proxy)
# Install Node.js 22 LTS via NodeSource:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt install -y nodejs nginx
sudo npm install -g pm2# In your project directory:
cd /var/www/example.com
npm install
pm2 start npm --name example -- start # or: pm2 start server.js --name example
pm2 save
pm2 startup # follow the printed command to autostart on bootnginx config — same reverse-proxy pattern, just point at the port your Node app listens on (commonly 3000):
server {
listen 80;
server_name example.com www.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Step 9 — close the loop with Cloudflare Origin SSL (Full strict)
Once the site loads over plain HTTP through Cloudflare, upgrade the connection between Cloudflare and your VPS to encrypted-and-validated:
- Cloudflare → SSL/TLS → Origin Server → Create Certificate. Defaults are fine. Cloudflare gives you a public certificate and a private key.
- On the VPS: save the cert as `/etc/ssl/cloudflare-origin.pem` and the key as `/etc/ssl/cloudflare-origin.key`. `chmod 600` the key.
- In your nginx server block, add: `listen 443 ssl;` plus `ssl_certificate /etc/ssl/cloudflare-origin.pem;` and `ssl_certificate_key /etc/ssl/cloudflare-origin.key;`. Reload nginx: `sudo nginx -t && sudo systemctl reload nginx`.
- Cloudflare → SSL/TLS → Overview → switch encryption mode to Full (strict).
- Cloudflare → SSL/TLS → Edge Certificates → enable Always Use HTTPS so Cloudflare auto-redirects HTTP requests to HTTPS.
Step 10 — verify it actually works
# DNS now returns Cloudflare IPs (104.x.x.x / 172.x.x.x), not your VPS IP:
dig +short example.com
# HTTPS responds with 200:
curl -sI https://example.com | head -1
# Origin reachable from Cloudflare (test from VPS):
curl -sI -H 'Host: example.com' http://127.0.0.1
# Browser test: open https://example.com — should see green padlock + your content.
# Public TLS audit: https://www.ssllabs.com/ssltest/analyze.html?d=example.comIf something on the VPS itself is misbehaving, the diagnostic command cheatsheet is at Essential Linux server diagnostics, and the deeper port/firewall guide is at Open ports, firewalls and 'why my port shows closed'.
VPS from€1.99/ month
Unlimited traffic, a 1 Gbps port and NVMe storage. 12 locations across Europe & the US.