How to Point a Domain to Your VPS (A/AAAA Records)

Before your website is reachable at yourdomain.com instead of a raw IP address, you need to configure DNS records pointing the domain to your VPS. This guide covers the full process.

Prerequisites

  • A registered domain name
  • Your VPS's public IPv4 (and IPv6, if applicable) address
  • Access to your domain's DNS management panel

Step 1 — Find Your VPS's IP Address

curl ifconfig.me

Step 2 — Confirm Which DNS Provider Is Authoritative

dig NS yourdomain.com

This shows which nameservers actually control your DNS — make sure you're editing records at that exact provider, not your domain registrar if they differ.

Step 3 — Add the A Record

In your DNS management panel:

Type: A
Name: @  (represents the root domain, yourdomain.com)
Value: YOUR_SERVER_IP
TTL: 3600

Step 4 — Add a Record for the www Subdomain

Either another A record:

Type: A
Name: www
Value: YOUR_SERVER_IP

Or a CNAME pointing to the root domain:

Type: CNAME
Name: www
Value: yourdomain.com

Step 5 — Add an AAAA Record (If Your VPS Has IPv6)

Type: AAAA
Name: @
Value: YOUR_IPV6_ADDRESS

Step 6 — Wait for DNS Propagation

Depending on TTL, this can take anywhere from a few minutes to a few hours. See How to Troubleshoot DNS Propagation Issues if it seems delayed.

Step 7 — Verify

dig +short yourdomain.com

Should return your VPS's IP address.

Step 8 — Configure Your Web Server

Ensure Nginx or Apache has a virtual host/server block configured for this domain — see Nginx Virtual Hosts: Hosting Multiple Websites or Apache Virtual Hosts: Hosting Multiple Websites.

Step 9 — Enable HTTPS

Once DNS resolves correctly:

sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Common Errors

Domain shows a parking page or registrar default page — the A record wasn't saved correctly, or you edited DNS at the wrong provider; recheck with dig NS.

www works but the root domain doesn't (or vice versa) — confirm both the @ and www records were created, not just one.

"This site can't be reached" — confirm DNS has propagated with dig, and that ports 80/443 are open on the VPS firewall.

Best Practices

  • Set a lower TTL (e.g. 300) before a planned change, and raise it back afterward once stable
  • Always configure both the root domain and www subdomain
  • Verify with dig before troubleshooting the web server itself

Continue Reading

Browse more articles in Networking & DNS.

  • point domain to vps, a record setup, dns configuration, domain to server
  • 0 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

DNS Fundamentals: A, AAAA, CNAME, MX, TXT & NS Records Explained

DNS translates human-readable domain names into the information servers actually need — IP...

How to Configure MX Records for Email Delivery

MX (Mail Exchange) records tell the internet which servers handle incoming email for your domain....

How to Use CNAME Records Correctly

CNAME records let you alias one domain name to another, but they come with important restrictions...

How to Configure a Static IP on a Linux VPS

Most VPS providers assign a static (unchanging) IP address by default, but understanding how...

How to Set Up a CDN in Front of Your VPS

A Content Delivery Network (CDN) caches your site's static content across globally distributed...