There was a problem loading the comments.

How to Point Your Domain to a Linux VPS Using A and AAAA Records

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Quick answer: Point a domain to a Linux VPS by creating an A record with your server's IPv4 address, an AAAA record if it has IPv6, and a CNAME for www. Find the IPs with ip -4 addr and ip -6 addr, add the records at your DNS host, then verify with dig or nslookup.

Before a domain can serve a website from your Linux VPS, it has to point at the server's IP address. That is the job of DNS A and AAAA records. This guide shows how to find your server IP and create the records correctly.

1. Find your server's IP addresses

Your VPS has an IPv4 address and often an IPv6 address too. From an SSH session, run:

ip -4 addr show      # shows the IPv4 address
ip -6 addr show      # shows the IPv6 address

Note the public IPv4 address (four numbers, for example 203.0.113.25) and, if present, the public IPv6 address.

2. Create the A record (IPv4)

In the DNS manager for your domain - either at your registrar or in your control panel - add:

Type:  A
Host:  @            (this represents the bare domain, yourdomain.com)
Value: 203.0.113.25 (your server's IPv4 address)
TTL:   3600

To make the www version work, add a CNAME:

Type:  CNAME
Host:  www
Value: yourdomain.com

3. Create the AAAA record (IPv6)

If your server has a public IPv6 address, add a matching AAAA record so IPv6 visitors reach the site directly:

Type:  AAAA
Host:  @
Value: 2001:db8::1  (your server's IPv6 address)
TTL:   3600

If your server has no IPv6 address, skip this record - do not point AAAA at an address the server does not have, or IPv6 visitors will fail to connect.

4. Wait for propagation and verify

DNS changes can take from a few minutes up to a few hours to spread. Check the record from your own machine:

nslookup yourdomain.com
# or
dig yourdomain.com A +short

When the command returns your server IP, the domain is pointed. If your site still does not load, confirm the web server (Nginx or Apache) is running and that its virtual host is configured for the domain.

Frequently asked questions

How long until the domain resolves?
Usually minutes to a few hours as DNS propagates; check with dig yourdomain.com +short.

Do I need an AAAA record?
Only if your server has a public IPv6 address - do not point AAAA at an address the server lacks.

All of this is handled for you on a SoftSys managed Linux VPS - tell our team the domains you want to host and we configure the DNS, virtual hosts, and SSL as part of setup. If you prefer to manage it yourself, the steps above are all you need.


Share via
Did you find this article useful?  

Related Articles

Tags

© Softsys Hosting