To point your domain name to your WordPress site hosted on your VPS, there are several steps you need to verify and complete. Here’s a detailed guide:
1. Understand the Process
When a user accesses your domain name, it resolves to the IP address of your VPS. This requires:
- Correct DNS configuration at your domain registrar.
- Correct DNS setup in Virtualmin.
2. Check Your Virtualmin DNS Records
Verify that the DNS settings in Virtualmin are correctly configured:
- Go to Virtualmin → Server Configuration → DNS Records.
- Ensure the following records exist:
- A Record: Points your domain to the VPS’s public IP address.
@ IN A [your VPS IP]
- NS Records: Define the nameservers.
@ IN NS AB-C1234.defghij.kl56789.net.
- MX Records: (Optional) For mail routing.
- CNAME Record: (Optional) For “www” to point to the root domain.
www IN CNAME abc.com.
3. Verify the Nameservers
Virtualmin generates default nameservers, but they need to be properly registered with your domain provider.
A. Get Your Server’s Nameservers
In Virtualmin, under Server Configuration → DNS Records, find the NS (nameserver) records. These are typically:
ns1.[yourdomain.com]
ns2.[yourdomain.com]
B. Register Nameservers with Your Domain Provider
- Log in to your domain registrar’s control panel.
- Locate the Custom Nameservers or Glue Records section.
- Add your nameservers (e.g.,
ns1.abc.com
and ns2.abc.com
).
- Point these to your VPS’s public IP address.
C. Update Domain DNS Settings
If you’re using your provider’s nameservers, simply update the A record to point to your VPS’s IP.
4. Ensure Your DNS Server is Running
Make sure named
(BIND DNS) is running on your VPS:
- Check the status of BIND:
systemctl status named
- Start it if not running:
systemctl start named
- Enable it to start on boot:
systemctl enable named
5. Check Firewall and Ports
Ensure that your server’s DNS port is open to allow external queries:
- Check the status of ports 53 (DNS) and 80 (HTTP):
firewall-cmd --list-all
- Open the ports if necessary:
firewall-cmd --permanent --add-port=53/udp
firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
6. Test DNS Configuration
Use DNS testing tools to check if your domain resolves to the VPS:
- Command Line: Use
dig
or nslookup
:
dig abc.com
nslookup abc.com
7. Check Propagation
DNS changes can take up to 48 hours to propagate worldwide. Use tools like What’s My DNS to monitor propagation progress.
8. SSL Certificate
Once your domain resolves correctly, secure your site with an SSL certificate:
- Go to Virtualmin → Server Configuration → SSL Certificate.
- Use Let’s Encrypt to obtain a free certificate.
If the issue persists, let me know the exact error or behavior you’re encountering, and I’ll guide you further!