ThisCalculator

Everyday

Connect GoDaddy or Namecheap Domain to Your Server

Updated · Standard formula, shown below

Connect GoDaddy or Namecheap Domain to Your Server

This guide walks you through pointing a domain registered at GoDaddy or Namecheap to a server that hosts your website or app. You’ll learn how to update DNS records so that when someone types your domain, they reach your server’s IP address. You’ll need access to your domain registrar account and the public IP address (or hostname) of your server.

What You’ll Need

  • A domain registered at GoDaddy or Namecheap (or access to the account that manages it).
  • The public IP address of your server (IPv4, e.g., 192.0.2.1). If you’re using a hosting provider, this is often called the “server IPâ€� or “dedicated IP.â€� For cloud services like AWS or DigitalOcean, it’s the instance’s public IPv4.
  • If you plan to use a subdomain like www, you’ll also need the same IP or a different one if your server handles multiple sites.
  • Access to your server’s control panel or command line to verify that it’s configured to respond to your domain (e.g., virtual hosts, nginx server blocks, or a hosting panel).

Step-by-Step

  1. Find your server’s IP address. Log into your hosting provider’s dashboard or run curl ifconfig.me from your server to see its public IPv4. Write it down.
  2. Log in to your domain registrar.
    • GoDaddy: Go to godaddy.com, sign in, and click your avatar → “My Products.â€� Find your domain and click “DNSâ€� or “Manage DNS.â€�
    • Namecheap: Go to namecheap.com, sign in, and click “Domain Listâ€� on the left. Next to your domain, click “Manage.â€� Then click the “Advanced DNSâ€� tab.
  3. Locate the DNS records section. You’ll see a table of records (A, CNAME, MX, etc.). If there are existing A records for “@� or “www,� you’ll edit them; otherwise, you’ll add new ones.
  4. Add or edit an A record for the root domain (@).
    • Type: A
    • Host/Name: @ (or leave blank if the registrar uses a blank field for the root)
    • Points to/Value: your server’s IP address
    • TTL: 600 seconds (or “Autoâ€� / “Defaultâ€�)

    Save the record.

  5. Add or edit an A record for “www�.
    • Type: A
    • Host/Name: www
    • Points to/Value: the same server IP (or a different one if you want www to go elsewhere)
    • TTL: 600 seconds

    Save this record too.

  6. If you’re using a subdomain (like blog.example.com), add an A record with the subdomain name in the Host field and the server IP.
  7. Wait for DNS propagation. DNS changes can take anywhere from a few minutes to 48 hours, though usually under an hour. The TTL you set determines how long old records are cached.
  8. Verify your server is configured. On your server, ensure your web server (Apache, Nginx, etc.) is set up to respond to your domain. For example, in Nginx you’d have a server_name directive matching your domain. If you’re using a hosting panel like cPanel, add the domain as an addon or parked domain.
  9. Test your domain. Open a browser and visit http://yourdomain.com and http://www.yourdomain.com. If you have SSL configured, test https:// as well. If it doesn’t work immediately, wait a bit and flush your DNS cache (on Windows: ipconfig /flushdns; on macOS: sudo dscacheutil -flushcache).

Common Mistakes

  • Using the wrong IP address. Double-check that the IP you entered is the public IP of your server, not your local computer’s IP (which usually starts with 192.168.x.x).
  • Typing “http://â€� in the Points to field. The A record value must be a bare IP address, not a URL.
  • Forgetting to add the “wwwâ€� record. If you only add the root domain, typing “wwwâ€� may fail unless your server redirects it.
  • Editing the wrong domain. If you have multiple domains in your account, make sure you’re editing the one you intend to connect.
  • Not waiting for propagation. DNS changes aren’t instant. Checking too soon may show the old site.
  • Ignoring existing records. If there’s already an A record pointing to an old server, replace it, don’t add a duplicate.

Tips

  • Use a low TTL (e.g., 300 or 600 seconds) when you’re first setting up, so changes propagate faster. Later you can increase it for performance.
  • If your server IP changes frequently (e.g., a home server), consider using a dynamic DNS service or a CNAME that points to a hostname that updates automatically.
  • For email, make sure your MX records are correct. Changing A records won’t affect email unless you also remove or change MX records.
  • Use a DNS lookup tool like dig or an online checker to see what records are currently resolving.
  • If you’re using a CDN or reverse proxy, you might point your domain to their IP instead of your server’s direct IP.

Troubleshooting

My domain isn’t loading after 24 hours. First, verify the A records are correct at the registrar. Then check if the server is actually responding by visiting the IP directly in a browser (e.g., http://192.0.2.1). If that works, the issue is DNS. If not, your server may be down or blocking port 80/443.

I see a “This site can’t be reached� error. This usually means the DNS hasn’t propagated or the server isn’t listening on the right port. Check your server’s firewall (ufw, iptables) to ensure ports 80 and 443 are open.

My domain loads but shows the wrong site. This often happens if you have multiple virtual hosts and the server is using the default site. Make sure your server’s configuration includes the exact domain name (including www) in the server_name directive.

I changed the A record, but it still shows the old site. Your local DNS cache may be stale. Flush your local DNS cache and try a different network (e.g., phone on cellular) to see if the new IP resolves.

I get an SSL certificate error. If you’re using HTTPS, you need a valid SSL certificate for your domain. Services like Let’s Encrypt can issue one for free, but you must first have the domain pointing to your server.

I added the A record but www doesn’t work. Double-check that you added a separate A record for “www� and that your server accepts requests for that host.

Frequently Asked Questions

How long does DNS propagation take?

Usually a few minutes to a few hours, but it can take up to 48 hours in rare cases. The TTL you set influences how long old records are cached.

Do I need to change nameservers or just DNS records?

You only need to change nameservers if you’re moving your DNS hosting to another provider. To connect your domain to a server, you simply edit the A records at your current registrar.

Can I point my domain to a server without a static IP?

Yes, but it’s not recommended. If your IP changes, you’ll need to update the A record each time. A dynamic DNS service can help automate this.

What’s the difference between an A record and a CNAME?

An A record points a domain directly to an IP address. A CNAME points a domain to another domain name (like an alias). For the root domain, you typically use an A record; for subdomains, you can use either.

Will changing A records affect my email?

No, unless you also change MX records. Email routing is controlled by MX records, not A records.

Do I need to set up an SPF or DKIM record?

Only if you’re sending email from your domain. For a website, you don’t need them. If you do use email, keep your existing MX and TXT records intact.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.