How to Link Your Domain to a Server IP Address
Connecting your domain to your server’s IP address via DNS mapping is a simple, essential step to make your website accessible. This guide walks you through linking a domain to your AvaHost VPS or dedicated server, with clear examples and tips to ensure success.
What You Need:
To link your domain to an IP address, make sure you have:
- A registered domain name
- A public IP address (your VPS, dedicated server, or hosting account)
- Access to the domain’s DNS settings (through the registrar or DNS provider)
Step 1: Get Your IP Address
You can find your server’s IP address:
- In your VPS or dedicated server dashboard
- By running ifconfig or ip a on your server via SSH
- Or asking support if you’re not sure
Example:
IP Address: 123.123.123.123
Step 2: Access DNS Management
Log in to the domain registrar or DNS provider where your domain is managed. If you bought your domain through AVA.hosting, DNS management is available directly in your client panel.
Find the section called:
- DNS Management
- Zone Editor
- Name Server Records
- DNS Settings
Step 3: Add an A Record
Now you need to create an A record, which tells DNS:
“this domain = this IP address.”
Here’s how:
| Type | Name | Value (IP) | TTL |
|---|---|---|---|
| A | @ | 123.123.123.123 | 3600 |
| A | www | 123.123.123.123 | 3600 |
Explanation:
- @ = root domain (example.com)
- www = www.example.com
- TTL (Time to Live) can be 3600 seconds (1 hour) or left at default
Optional:
If you want to use subdomains (like blog.example.com), add separate A records for each.
Step 4: Wait for DNS Propagation
DNS changes can take a few minutes to 24–48 hours to fully propagate worldwide.
You can check your domain status using:
- nslookup yourdomain.com in terminal
- dig yourdomain.com (for advanced users)
Step 5: Make Sure the Server Is Ready
On your server (especially if using Apache or Nginx), you must ensure the server responds to the domain. This is called virtual host configuration.
Example (Nginx):
server {
listen 80;
server_name example.com www.example.com;
root /var/www/example;
index index.html;
}
Once configured, restart your web server:
sudo systemctl restart nginx
Final Checks
- Does your domain open in the browser?
- Do both example.com and www.example.com work?
- Do you have an SSL certificate installed (optional but recommended)?
If yes — congratulations! Your domain is now successfully linked to your server.
Conclusion
Linking your domain to your server’s IP is straightforward with DNS A records and proper virtual host setup. The examples above make it easy to get your website live. Test your setup, secure it with SSL, and enjoy a seamless online presence.


