How to point a domain to a VPS
To point a domain to a VPS, open the DNS settings wherever your domain's DNS is hosted (your registrar, or a DNS provider such as Cloudflare). Create an A record for the root name @ and for www with the server's public IPv4 address, add AAAA records only if the server answers on IPv6, and delete any old parking records. Then configure the web server on the VPS for that name and issue an HTTPS certificate.
DNS only tells browsers which IP to use; the VPS must still accept ports 80 and 443 and know which site to serve.
Quick checklist
- Note the VPS public IPv4 and IPv6 addresses.
- Find where your DNS is hosted and edit records there.
- A day ahead, lower the TTL on records you will change to 300 seconds.
- Create
@andwwwrecords; add AAAA only if IPv6 works. - Remove parking, forwarding or old host records for the same names.
- Check the authoritative nameserver and a public resolver.
- Open ports 80 and 443, set the Nginx
server_name, then run Certbot.
Step 1: get the server's IP addresses
Your control panel shows the public IP. To confirm it from the server:
ip -4 addr show scope global
ip -6 addr show scope global
curl -4 https://ifconfig.co
curl -6 https://ifconfig.co
Use the public address, not a private one such as 10.x.x.x. If curl -6 fails, do not publish an AAAA record yet.
Step 2: find where your DNS is actually hosted
Records only take effect at the DNS host your domain is delegated to. If the nameservers belong to your registrar, edit records in the registrar's DNS panel. If they belong to Cloudflare or another DNS provider, edit them there; records you add at the registrar will be ignored.
dig NS example.com +short
whois example.com | grep -i "name server"
If you only need the site on a new server, keep your nameservers and change the records; a nameserver change is cached longer. Moving a live site with its files and databases is a bigger job, covered in how to migrate a website to a new host.
Step 3: create the records
Most DNS panels use @ for the root name (example.com) and a bare label such as www for subdomains. A typical setup looks like this, with documentation addresses standing in for yours:
| Type | Name | Value | TTL |
|---|---|---|---|
| A | @ | 203.0.113.10 | 300 during the change, 3600 after |
| A | www | 203.0.113.10 | Same as above |
| AAAA | @ | 2001:db8::10 | Only if the server serves IPv6 |
| AAAA | www | 2001:db8::10 | Only if the server serves IPv6 |
Instead of a second A record, you can make www a CNAME to example.com, so it follows the root name if the IP changes. Two rules apply:
- A name with a CNAME should hold no other record. RFC 1034 says no other data should be present at that name, so delete any A, AAAA or TXT record on
wwwbefore adding the CNAME. - Do not put a CNAME on the root name. The root always carries SOA and NS records, so a CNAME there breaks the rule above. Use A and AAAA records at
@; some providers, Cloudflare among them, offer CNAME flattening as a workaround.
Remove conflicting records
New domains often come with the registrar's parking page: an A record pointing at a parking IP, a URL-forwarding entry, or a wildcard * record. Left in place, it sends some visitors there. Delete every A, AAAA and forwarding entry for @ and www that is not yours.
A stale AAAA record is the most common hidden fault. Devices with IPv6 will usually try that address first, and Let's Encrypt's documentation says its validation always prefers IPv6 when both A and AAAA records exist. If the AAAA record points at an old host or a server that answers on IPv6 without serving your site, validation fails even though IPv4 works.
Step 4: TTL and propagation
TTL (time to live) is how many seconds a resolver may cache a record before asking again. "Propagation" is really caches expiring: until the old TTL runs out, some resolvers keep handing out the old IP.
- Lower the TTL a day before. Set the existing records to 300 seconds, then wait at least as long as their old TTL (24 hours covers most setups) before the switch.
- Make the change. Resolvers pick up the new IP as caches expire.
- Raise the TTL afterwards to 3600 or higher once stable for a day.
Negative answers are cached too: if a resolver looked the name up before the record existed, it caches "does not exist" for a period set in the SOA record. So a brand-new name can show DNS_PROBE_FINISHED_NXDOMAIN for a while on one network and work on another.
Step 5: check the records
Ask the authoritative nameserver first; it shows exactly what you published:
dig NS example.com +short
dig @ns1.your-dns-host.example example.com A +short
dig @ns1.your-dns-host.example www.example.com A +short
dig @ns1.your-dns-host.example example.com AAAA +short
Then ask a public resolver, which shows what most visitors will see:
dig @1.1.1.1 example.com A +short
dig @1.1.1.1 www.example.com +short
nslookup example.com 1.1.1.1
On a Windows PC, clear the local cache with ipconfig /flushdns. If the authoritative server shows the right IP but the public resolver does not, wait for the old TTL to run out. If the authoritative server is wrong, the record is wrong or you edited it in the wrong place. Which resolver your own machine uses is a separate choice, covered in the fastest DNS resolvers for India.
Step 6: configure Nginx for the domain
Nginx picks a server block by matching the request's hostname against server_name. If nothing matches, it uses the default server for that port, which is why a freshly pointed domain often shows the "Welcome to nginx" page.
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example.com/public;
index index.html;
}
Add index.php and a PHP-FPM location block only once PHP is installed; without a PHP handler, Nginx would serve .php files as plain text and expose their source.
Save it as /etc/nginx/sites-available/example.com on Ubuntu or Debian, link it into sites-enabled, then test, reload and open the firewall:
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo ufw allow 'Nginx Full'
sudo ufw status
If ufw status shows the firewall as inactive and you decide to enable it, run sudo ufw allow OpenSSH first, or sudo ufw enable will cut off your SSH session.
On AlmaLinux, put the file in /etc/nginx/conf.d/example.com.conf and open the ports with sudo firewall-cmd --permanent --add-service=http --add-service=https followed by sudo firewall-cmd --reload. Also open 80 and 443 in any firewall your provider runs in front of the server.
Step 7: add HTTPS with Certbot
Install Certbot with its Nginx plugin first. On Ubuntu or Debian, sudo apt install certbot python3-certbot-nginx works, or follow the snap install on certbot.eff.org; on AlmaLinux, enable EPEL with sudo dnf install epel-release, then run sudo dnf install certbot python3-certbot-nginx. Once both names resolve to the server and port 80 is open, request one certificate covering both:
sudo certbot --nginx -d example.com -d www.example.com
sudo certbot renew --dry-run
The HTTP-01 challenge Certbot uses here works only on port 80, and Let's Encrypt must reach your VPS through the DNS records you published. If issuance fails, check in this order: the A and AAAA records from Step 5, the firewall, and that server_name lists every name you requested. The dry run tests renewal against the Let's Encrypt staging server.
Using Cloudflare DNS
If your nameservers are Cloudflare's, each A, AAAA or CNAME record has a proxy status:
- Proxied (orange cloud): DNS returns Cloudflare's addresses, not your VPS IP, and web traffic passes through Cloudflare. The TTL is fixed at Auto (300 seconds). SSH to the hostname will not reach your server; connect to the IP or use a separate DNS-only name.
- DNS only (grey cloud): DNS returns your VPS IP and traffic goes straight to the server.
The simplest order: DNS only first, issue the certificate, then switch to proxied. Under SSL/TLS, set the encryption mode to Full (strict). That mode requires a valid, unexpired certificate on the server, issued by a public CA or by Cloudflare's Origin CA, that matches the hostname. Avoid Flexible: Cloudflare then talks to your server over plain HTTP, and if Nginx redirects HTTP to HTTPS you get a redirect loop, explained in ERR_TOO_MANY_REDIRECTS.
Pointing a domain at a Bigdomainhost VPS
Bigdomainhost does not sell or manage domains, so you create the records at your own registrar or DNS provider, as above. On the server side:
- Every KVM VPS has a dedicated IPv4 address and an IPv6 /64, and the control panel shows the IP as soon as provisioning finishes. Servers run in Mumbai (BOM-1) and Delhi NCR (DEL-1).
- The instance firewall denies inbound traffic except SSH on port 22 by default, so add rules for ports 80 and 443 in the instance view before running Certbot.
- You can set reverse DNS (PTR) for your IP from the instance view once the forward A record resolves to it. The networking and firewall documentation has the details.
- Out-of-band console access in the control panel gets you back in if a firewall rule locks you out of SSH.
For help, call +91 75994 50220 (answered by the NOC in IST hours), message the same number on WhatsApp at any time, or email support@bigdomainhost.com.
Sources (checked )
- RFC Editor: RFC 1034: Domain names, concepts and facilities
- nginx.org: Server names
- Certbot documentation: User guide
- Let's Encrypt: IPv6 support
- Cloudflare Docs: Proxy status
- Cloudflare Docs: Full (strict) encryption mode