Setting Up Reverse DNS (PTR) Record: Email and Security
What is a PTR record, how it affects email deliverability and security, how to set it up in the REXE panel, verification with dig -x, and common issues.
Point your domain to a server: A, AAAA, CNAME, MX and TXT record types, DNS propagation time, testing with dig/nslookup, and common mistakes.
After purchasing a domain, the most fundamental task is pointing it to your server's IP address. This is done through DNS (Domain Name System) records. In this guide, we'll cover A, AAAA, CNAME and other DNS record types, how to configure them, and common mistakes to avoid.
An A record maps a domain name to an IPv4 address. It's the most basic and commonly used DNS record.
example.com. IN A 203.0.113.50
www IN A 203.0.113.50
www, mail, api.The AAAA record is the IPv6 equivalent of the A record. Add this if your server has an IPv6 address.
example.com. IN AAAA 2001:db8::1
www IN AAAA 2001:db8::1
IPv6 support is increasingly widespread. Adding both A and AAAA records ensures your site is accessible over both IPv4 and IPv6.
A CNAME record redirects one domain name to another domain name, using a hostname instead of an IP address.
www IN CNAME example.com.
blog IN CNAME example.com.
shop IN CNAME store.example.com.
CNAME usage rules:
MX records specify the mail server for a domain. Required to receive email.
example.com. IN MX 10 mail.example.com.
example.com. IN MX 20 mail2.example.com.
The server with the lower priority value (10, 20) is tried first. Use a higher priority value for backup servers.
TXT records store text information about a domain. Used for SPF, DKIM, DMARC and domain verification.
example.com. IN TXT "v=spf1 ip4:203.0.113.50 ~all"
example.com. IN TXT "google-site-verification=abc123"
NS records specify the authoritative DNS servers for a domain. Usually managed by your domain registrar.
example.com. IN NS ns1.rexe.tr.
example.com. IN NS ns2.rexe.tr.
You can find your server's IP address in the REXE customer panel. Alternatively, connect via SSH and run:
# Get the server's external IP address
curl -s ifconfig.me
# or
ip addr show eth0 | grep 'inet ' | awk '{print $2}'
Log in to the management panel of the registrar where you purchased your domain. Common registrars:
Type: A
Host: @ (or leave blank — for root domain)
Value: 203.0.113.50 (your server's IP address)
TTL: 3600
For the www subdomain:
Type: A
Host: www
Value: 203.0.113.50
TTL: 3600
If your server has an IPv6 address:
Type: AAAA
Host: @
Value: 2001:db8::1 (your server's IPv6 address)
TTL: 3600
DNS changes don't take effect immediately. Propagation time depends on several factors:
Typical propagation times:
Before making DNS changes, lower the TTL to 300 (5 minutes). You can raise it again after the change is complete. This significantly reduces propagation time.
dig (Domain Information Groper) is the most powerful tool for testing DNS queries.
# Query A record
dig example.com A
# Query AAAA record
dig example.com AAAA
# Query CNAME record
dig www.example.com CNAME
# Query MX record
dig example.com MX
# Query TXT record
dig example.com TXT
# Query a specific DNS server
dig @8.8.8.8 example.com A
# Short output
dig +short example.com A
# List all records
dig example.com ANY
Reading dig output:
;; ANSWER SECTION:
example.com. 3600 IN A 203.0.113.50
3600: TTL value (seconds)IN: Internet classA: Record type203.0.113.50: IP addressnslookup is an alternative DNS testing tool available on Windows and Linux.
# Basic query
nslookup example.com
# Specific record type
nslookup -type=MX example.com
nslookup -type=TXT example.com
# Use a specific DNS server
nslookup example.com 8.8.8.8
# Interactive mode
nslookup
> server 8.8.8.8
> set type=A
> example.com
# WRONG
@ IN CNAME another-domain.com.
# CORRECT
@ IN A 203.0.113.50
Fully qualified domain names in DNS records end with a dot. Without the dot, the domain name is appended to the current zone.
# WRONG (appended to zone: mail.example.com.example.com)
MX 10 mail.example.com
# CORRECT
MX 10 mail.example.com.
Creating both A and CNAME records for the same hostname causes conflicts.
# Check existing records
dig www.example.com ANY
A high TTL value causes changes to propagate slowly. Lower the TTL before making changes.
# Check current TTL value
dig +nocmd example.com A +noall +answer
Cloudflare offers free DNS management and CDN services. To move your domain to Cloudflare:
# Check Cloudflare NS servers
dig example.com NS
# Output: ns1.cloudflare.com, ns2.cloudflare.com
When Cloudflare's proxy feature (orange cloud) is enabled, your real server IP is hidden. If SSL/TLS settings are not configured correctly, you may experience connection issues.
Domain pointing is the cornerstone of web infrastructure. Use A records for IPv4, AAAA for IPv6, and CNAME for alias redirects. DNS changes take time to propagate; test your changes with dig and nslookup. Proper TTL management and record type selection are critical for a smooth DNS experience.
DNS changes typically propagate within 2-4 hours, but this can take up to 48 hours. If you lower your TTL to 300 seconds (5 minutes) before making changes, you can significantly reduce propagation time.
An A record maps a domain directly to an IP address. A CNAME redirects one domain name to another domain name. CNAME cannot be used for the root domain (@); use an A record instead. Both can be used for subdomains.
DNS caches may continue to hold the old record due to the old TTL value. Check which IP is being returned with 'dig +short example.com A'. Test with different DNS servers (8.8.8.8, 1.1.1.1) to understand propagation status.
You can add multiple A records for the same hostname. Traffic will be distributed among these IPs using DNS round-robin. However, for real load balancing, it's recommended to use a load balancer.
Yes, separate records are required for www.example.com and example.com. Create a CNAME @ or A record for www, and an A record for the root domain. Some DNS providers offer ALIAS or ANAME records that provide CNAME-like functionality for the root domain.
What is a PTR record, how it affects email deliverability and security, how to set it up in the REXE panel, verification with dig -x, and common issues.
What are nameservers, how to change NS at your registrar, propagation time, checking with whois/dig, and common registrar interfaces guide.
Historical stats with vnstat, real-time monitoring with iftop, per-process bandwidth with nethogs, nload usage, and interpreting results.