This guide walks you through:
- Registering a domain on Namecheap
- Pointing it to your VPS IP
- Configuring Nginx with
sites-available - Securing it with free SSL via Certbot
1. Register a Domain on Namecheap
-
Go to Namecheap and purchase a domain.
-
In Domain List → Manage → Advanced DNS, add these records:
- Root domain (
@) → your VPS IP - Subdomain (
www) → your VPS IP
- Root domain (
Example:
Host: @ | Value: <your-vps-ip> | TTL: Automatic
Host: www | Value: <your-vps-ip> | TTL: Automatic
👉 Test after a few minutes with:
ping yourdomain.com
2. Install Nginx on Your VPS
SSH into your VPS:
ssh user@<your-server-ip>
sudo apt update && sudo apt install nginx -y
Verify it’s running:
systemctl status nginx
Default page is available at http://<your-vps-ip>.
3. Configure Firewall (UFW)
Allow web traffic and secure the firewall:
sudo ufw allow 'Nginx Full'
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status
4. Create Nginx Config for Your Domain
Inside /etc/nginx/sites-available, create a file for your domain:
sudo nano /etc/nginx/sites-available/yourdomain.com
Paste this basic config:
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Enable it by linking to sites-enabled:
sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Now http://yourdomain.com should work.
5. Secure with SSL (Certbot + Let’s Encrypt)
Install Certbot:
sudo apt install certbot python3-certbot-nginx -y
Run Certbot:
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com
Follow prompts:
- Enter your email
- Accept terms
- Choose redirect HTTP → HTTPS
Certbot updates your config automatically.
Test auto-renew:
sudo certbot renew --dry-run
6. Verify HTTPS
Visit:
You should see the secure lock icon 🔒.
✅ Done!
- Domain registered on Namecheap
- DNS pointed to VPS
- Nginx configured with
sites-available/sites-enabled - Free SSL certificate installed with Certbot
🎉 Your VPS is now serving a domain with HTTPS!
👉 Next step: host multiple domains or subdomains on the same VPS using Nginx server blocks.
Read more
Next.js App on a VPS (Hetzner) in traditional way
Clone your repo, install Node, build your Next.js app, run it on a custom port, and keep it alive with PM2.
Connect LM Studio to Antigravity IDE Using MCP
I wanted to use my local LM Studio models inside Antigravity IDE, so I connected them through MCP.
Move CrossOver Bottles to an External SSD on macOS
When running low on storage, you can move all CrossOver bottles to an external SSD and keep your Mac's internal storage free.
