DNS

01

Point a Domain to Your Server

To associate a domain with your VPS, you need to add DNS records at your domain registrar (where you bought the domain) or with your DNS provider.

A Record (IPv4)

Create an A record pointing to your IP:

NameTypeValueTTL
@ASERVER_IP3600
wwwASERVER_IP3600

AAAA Record (IPv6)

If the server has an IPv6 address:

NameTypeValueTTL
@AAAAIPv6_SERVER3600

CNAME Record (Alias)

To point a subdomain to another hostname:

NameTypeValue
wwwCNAMEexample.com.
02

DNS Propagation

After modifying DNS records, changes take time to propagate across the internet (from 15 minutes up to 48 hours). You can check the propagation status with:

  • dnschecker.org
  • whatsmydns.net
03

Verify DNS from the Server

bash
# Resolve a domain
nslookup example.com

# Detailed resolution
dig example.com

# Check MX record (email)
dig example.com MX

# Check which DNS server is being used
cat /etc/resolv.conf
04

Change Server DNS (Resolver)

Your server's DNS determines which servers it uses to resolve names. Edit /etc/resolv.conf:

nameserver 8.8.8.8 nameserver 1.1.1.1

On systems with systemd-resolved:

bash
# Edit the configuration file
nano /etc/systemd/resolved.conf
ini
[Resolve]
DNS=8.8.8.8 1.1.1.1
FallbackDNS=9.9.9.9
bash
systemctl restart systemd-resolved
05

Add a Local Hostname (/etc/hosts)

To map names to IPs without DNS (useful for local testing):

bash
nano /etc/hosts

Add:

192.168.1.100 my-server.local
06

Popular DNS Providers

ProviderPrimarySecondary
Google8.8.8.88.8.4.4
Cloudflare1.1.1.11.0.0.1
Quad99.9.9.9149.112.112.112

DeluxHost, fondata nel 2023, offre soluzioni di hosting di alta qualità per diverse esigenze digitali. Forniamo hosting condiviso, VPS e server dedicati con sicurezza avanzata e datacenter globali.

© DeluxHost, Tutti i diritti riservati. | Partita IVA: IT17734661006
Tutti i sistemi operativi