May 23, 2026Guides
How to Point a Domain to Your VPS
Step-by-step guide to connecting your domain to a VPS: DNS A records, www CNAME, verification, and Nginx server block.

After ordering a VPS, one of the most common tasks is pointing your domain name to the server IP so visitors can open your site. This guide explains how to configure DNS at your registrar and prepare the web server on your Hiddence VPS.
What you need
- A registered domain (at any registrar)
- Your VPS public IP address from the Hiddence client area
- Access to DNS management at your registrar
- Nginx or Apache installed on the server (for the website itself)
Step 1: Create an A record
Log in to your domain registrar panel and open DNS settings. Add an A record that points your root domain to the VPS IP:
bash
Type: A
Host / Name: @ (or leave empty for root domain)
Value / Points to: YOUR_VPS_IP
TTL: 300–3600 (auto is fine)Step 2: Configure www subdomain
You can either add another A record for www or use a CNAME pointing to the root domain:
bash
Option A — A record:
Type: A
Host: www
Value: YOUR_VPS_IP
Option B — CNAME:
Type: CNAME
Host: www
Value: yourdomain.comStep 3: Verify DNS propagation
DNS changes can take from a few minutes up to 48 hours. Check whether the domain resolves to your server:
bash
dig yourdomain.com +short
dig www.yourdomain.com +short
# Or use nslookup:
nslookup yourdomain.comStep 4: Create Nginx server block
When DNS points to your VPS, configure Nginx to accept requests for your domain:
bash
sudo nano /etc/nginx/sites-available/yourdomain.com
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
root /var/www/yourdomain.com;
index index.html index.php;
}
sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginxUseful tips
- Use Cloudflare or another DNS only if you understand proxy/CDN settings
- After DNS works, install SSL with Let's Encrypt (Certbot)
- Lower TTL before migration to speed up DNS updates
- Keep a backup of old DNS records before changing them
- Use separate A records for mail if you run an email server