Pointing a Domain to a Server: A, AAAA and CNAME Guide
Point your domain to a server: A, AAAA, CNAME, MX and TXT record types, DNS propagation time, testing with dig/nslookup, and common mistakes.
When to change IP, how to request IP change in REXE panel, adding additional IPs, configuring multiple IPs on Linux with ip command and netplan.
Changing your server's IP address or adding additional IP addresses may be necessary in various scenarios. In this guide, you'll learn when an IP change is needed, how to request it from the REXE panel, and how to configure multiple IP addresses on Linux.
If your server's IP address has been blacklisted due to spam or malicious activity, email delivery and access to some services may be blocked.
# Check if IP is on a blacklist
for bl in zen.spamhaus.org bl.spamcop.net b.barracudacentral.org; do
result=$(dig +short 50.113.0.203.$bl)
if [ -n "$result" ]; then
echo "BLACKLISTED: $bl"
fi
done
If the IP address has been null-routed or its reputation has been damaged after an intense DDoS attack, an IP change may be necessary.
If your server's IP address is being targeted or needs to be hidden, an IP change can be a solution.
When an IP address from a different geographic location is needed (CDN, geo-restriction bypass, etc.).
Don't forget to update your DNS records before changing the IP. Update A, PTR, and other relevant records for the new IP. Otherwise, your website and email services may stop working.
# 1. Verify new IP
curl -s ifconfig.me
# 2. Update DNS records (at domain registrar)
# A record: @ → new IP
# A record: www → new IP
# 3. Update PTR record (from REXE panel)
# Set PTR record for new IP
# 4. Update firewall rules
sudo ufw status
# Reconfigure rules if necessary
# 5. Check SSL certificate
# Is Let's Encrypt certificate working with new IP?
curl -I https://example.com
Additional IP addresses are used to run multiple websites, services, or applications on the same server.
IPs added with the ip command are lost when the system restarts. Use for testing purposes.
# List current IP addresses
ip addr show
ip addr show eth0
# Add additional IP
sudo ip addr add 203.0.113.237/24 dev eth0
# Add multiple IPs
sudo ip addr add 203.0.113.238/24 dev eth0
sudo ip addr add 203.0.113.239/24 dev eth0
# Remove IP
sudo ip addr del 203.0.113.237/24 dev eth0
# Restart interface
sudo ip link set eth0 down
sudo ip link set eth0 up
# Check routing table
ip route show
# Add default gateway
sudo ip route add default via 203.0.113.1
Netplan is Ubuntu's modern network configuration tool.
# View current netplan configuration
cat /etc/netplan/*.yaml
# Edit configuration file
sudo nano /etc/netplan/00-installer-config.yaml
Single IP configuration:
# /etc/netplan/00-installer-config.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 203.0.113.50/24
routes:
- to: default
via: 203.0.113.1
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
Multiple IP configuration:
# /etc/netplan/00-installer-config.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 203.0.113.50/24 # Primary IP
- 203.0.113.237/24 # Additional IP 1
- 203.0.113.238/24 # Additional IP 2
routes:
- to: default
via: 203.0.113.1
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
# Test configuration (without applying)
sudo netplan try
# Apply configuration
sudo netplan apply
# Verify IP addresses
ip addr show eth0
sudo nano /etc/network/interfaces
# Primary IP
auto eth0
iface eth0 inet static
address 203.0.113.50
netmask 255.255.255.0
gateway 203.0.113.1
dns-nameservers 8.8.8.8 1.1.1.1
# Additional IP (alias)
auto eth0:1
iface eth0:1 inet static
address 203.0.113.237
netmask 255.255.255.0
# Additional IP 2
auto eth0:2
iface eth0:2 inet static
address 203.0.113.238
netmask 255.255.255.0
# Restart network service
sudo systemctl restart networking
# List current connections
nmcli connection show
# Get connection name
nmcli device status
# Add additional IP
sudo nmcli connection modify "Wired connection 1" \
+ipv4.addresses "203.0.113.237/24"
# Add multiple IPs
sudo nmcli connection modify "Wired connection 1" \
+ipv4.addresses "203.0.113.237/24" \
+ipv4.addresses "203.0.113.238/24"
# Apply changes
sudo nmcli connection up "Wired connection 1"
# Verify IP addresses
ip addr show
To run different websites on different IPs:
# /etc/nginx/sites-available/site1.conf
server {
listen 203.0.113.50:80;
server_name site1.com www.site1.com;
root /var/www/site1;
# ...
}
# /etc/nginx/sites-available/site2.conf
server {
listen 203.0.113.237:80;
server_name site2.com www.site2.com;
root /var/www/site2;
# ...
}
# Test configuration
sudo nginx -t
# Reload Nginx
sudo systemctl reload nginx
# List all IP addresses
ip addr show
# Specific interface
ip addr show eth0
# Routing table
ip route show
# Connectivity test
ping -I 203.0.113.237 8.8.8.8
# Check external IP
curl --interface 203.0.113.237 ifconfig.me
# Test all IPs
for ip in 203.0.113.50 203.0.113.237 203.0.113.238; do
echo -n "$ip: "
curl --interface $ip -s ifconfig.me
echo
done
After adding additional IPs, don't forget to set up a separate PTR record for each IP. Especially if you plan to send email, each IP must have a PTR record.
Pay attention to YAML indentation in Netplan configuration. Incorrect indentation will prevent the configuration from being applied. Use 2 spaces for each level.
IP changes and adding additional IPs are an important part of server management. These operations, which can be easily requested from the REXE panel, can be permanently configured on Linux with the ip command or netplan. Remember to update DNS and PTR records for each new IP and review firewall rules.
The REXE support team typically processes IP change requests within a few hours. However, DNS propagation can take 24-48 hours. Be ready to update your DNS records before the IP change.
Additional IP addresses are generally subject to additional fees. Check the REXE customer panel or support team for current pricing.
You may have forgotten to run 'sudo netplan apply'. Also check for indentation errors in the YAML file. You can test first with 'sudo netplan try'.
Since modern browsers support SNI (Server Name Indication), you can use multiple SSL certificates on a single IP. For older clients, you can assign a separate IP to each domain. Let's Encrypt supports both scenarios.
Set up a PTR record for the new IP, update the MX record, and add the new IP to the SPF record. Also check if the new IP is on any blacklists. You can get help from the REXE support team for all these tasks.
Point your domain to a server: A, AAAA, CNAME, MX and TXT record types, DNS propagation time, testing with dig/nslookup, and common mistakes.
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.