When connecting a GoDaddy domain to your web server's IP address, you're essentially creating an A-record (Address record) in DNS. This is the fundamental mapping that tells browsers "when someone requests example.com, route them to X.X.X.X".
Here's how to set this up in GoDaddy's DNS management:
- Log in to your GoDaddy account and navigate to Domain Portfolio
- Click the DNS button next to your domain
- In the Records section, find the A record table
- Either edit the existing @ A-record or add a new one
- Enter your server's public IP in the Points to field
- Set TTL (Time to Live) - 600 seconds (10 mins) is good for initial setup
After saving changes, verify with these terminal commands:
# Linux/macOS
dig +short yourdomain.com
# Windows
nslookup yourdomain.com
For professional deployments, you'll want both the root domain and www version working:
Type Host Points to TTL
-------------------------------------
A @ 192.0.2.1 3600
CNAME www yourdomain.com. 3600
Remember that DNS changes take time to propagate globally. While testing, you can override locally by editing your hosts file:
# Linux/macOS hosts file location
/etc/hosts
# Windows hosts file location
C:\Windows\System32\drivers\etc\hosts
# Sample entry
192.0.2.1 yourdomain.com www.yourdomain.com
- Error 404: Verify your web server is configured to handle the domain name
- Connection timeout: Check firewall rules allow port 80/443 traffic
- SSL problems: Ensure your certificate includes the domain name
For dynamic IP situations, use GoDaddy's API to automate A-record updates:
#!/bin/bash
# Sample script to update GoDaddy DNS
IP=$(curl -s ifconfig.me)
curl -X PUT "https://api.godaddy.com/v1/domains/yourdomain.com/records/A/@" \
-H "Authorization: sso-key your_api_key:your_api_secret" \
-H "Content-Type: application/json" \
-d "[{\"data\": \"$IP\", \"ttl\": 600}]"
When you want to associate your GoDaddy domain with a web server's IP address, you'll need to modify the A record (Address record) in your domain's DNS settings. The A record directly maps your domain name to the IPv4 address of your server.
Before making changes, ensure you have:
- Your public server IP (e.g., 192.0.2.1)
- GoDaddy account credentials
- Access to your domain's DNS management
Log into your GoDaddy account and navigate to:
- My Products → Domains
- Click on your domain name
- Select "DNS" or "Manage DNS"
Locate the A
record section (typically under "Records"). Here's what a basic configuration looks like:
Type: A Name: @ (or leave blank for root domain) Value: your.server.ip.address TTL: 3600 (default)
For subdomains (e.g., blog.yourdomain.com):
Type: A Name: blog Value: your.server.ip.address TTL: 3600
After saving changes, use terminal commands to verify:
# Linux/macOS dig yourdomain.com +short nslookup yourdomain.com # Windows nslookup yourdomain.com
For redundancy, consider adding multiple A records (round-robin DNS):
Type: A Name: @ Value: 192.0.2.1 TTL: 300 Type: A Name: @ Value: 192.0.2.2 TTL: 300
- Propagation delays: DNS changes may take 24-48 hours globally
- Syntax errors: Ensure IP format is correct (no http:// or trailing slashes)
- Caching issues: Clear local DNS cache with
ipconfig /flushdns
(Windows) orsudo dscacheutil -flushcache
(macOS)
For dynamic IP situations, use GoDaddy's API with a script like this Python example:
import requests import json domain = "yourdomain.com" name = "@" # root domain key = "your_godaddy_api_key" secret = "your_godaddy_api_secret" new_ip = "1.2.3.4" # Get this dynamically headers = { "Authorization": f"sso-key {key}:{secret}" } data = [{ "data": new_ip, "ttl": 600 }] response = requests.put( f"https://api.godaddy.com/v1/domains/{domain}/records/A/{name}", headers=headers, json=data ) print(response.status_code)