Point GoDaddy Domain to VPS with Custom Nameservers
This guide walks you through pointing a GoDaddy-registered domain to a VPS (Virtual Private Server) using custom nameservers. You’ll set up nameserver records at GoDaddy, configure your VPS’s DNS (often via a control panel like cPanel, Plesk, or a DNS service), and then verify the change. This is the standard approach for hosting a website or app on a VPS while keeping your domain registration with GoDaddy.
What You’ll Need
- A domain registered with GoDaddy.
- An active VPS with a static IP address (usually provided by your hosting company).
- Access to your VPS’s DNS management (e.g., cPanel, Plesk, or a DNS service like Cloudflare).
- If you plan to run your own nameservers on the VPS, you’ll need root access and the ability to install DNS software (like BIND).
Step-by-Step
- Get your VPS IP address. Log into your VPS provider’s dashboard and note the primary IPv4 address (e.g., 203.0.113.10).
- Decide on nameserver hostnames. Choose two names like
ns1.yourdomain.comandns2.yourdomain.com. Using your own domain for the nameservers is common and professional. - Create DNS records on your VPS. In your VPS’s DNS management (cPanel, Plesk, or a DNS service), create an A record for each nameserver hostname pointing to your VPS IP. For example:
ns1.yourdomain.com→203.0.113.10
ns2.yourdomain.com→203.0.113.10(or a second IP if you have one). - Add your domain to the VPS. If using a control panel, add your domain as a new domain or addon domain. If using a DNS service, create a zone for your domain with the necessary records (A, CNAME, MX, etc.).
- Log in to your GoDaddy account. Go to My Products, then click DNS or Manage next to your domain.
- Change nameservers at GoDaddy. In the DNS management page, look for Nameservers (often under the Domain tab). Click Change Nameservers.
- Enter your custom nameservers. Select I’ll use my own nameservers and enter
ns1.yourdomain.comandns2.yourdomain.com. Click Save. - Wait for propagation. DNS changes can take anywhere from a few minutes to 48 hours to propagate globally. Be patient.
- Verify the setup. Use a tool like
digor an online DNS checker to confirm that your domain’s NS records point to your custom nameservers and that the A record resolves to your VPS IP.
Common Mistakes
- Not creating the A records for ns1/ns2 first. If the nameserver hostnames don’t resolve, the domain won’t work.
- Using the same IP for both nameservers. While it works, it’s not recommended for redundancy.
- Forgetting to add the domain to the VPS. Even if nameservers point correctly, the site won’t load without a DNS zone and web server config.
- Typing the nameserver hostname without a trailing dot. In some DNS interfaces, you must include a trailing dot (e.g.,
ns1.yourdomain.com.). - Changing nameservers before the VPS is ready. This causes downtime.
Tips
- Use a DNS service like Cloudflare instead of running your own nameservers—it’s easier, more reliable, and free.
- Set TTL (Time to Live) to a low value (e.g., 300) before making changes so propagation is faster.
- Keep GoDaddy’s default nameservers until you’ve fully configured your VPS to avoid downtime.
- Double-check your VPS’s firewall to ensure ports 53 (DNS) are open if you’re running your own nameservers.
- Use a third-party DNS checker to see the global propagation status.
Troubleshooting
- Domain doesn’t resolve after 48 hours: Check that the nameserver hostnames (ns1, ns2) have A records pointing to your VPS IP. Also, verify your VPS is actually running DNS and has the correct zone file.
- NS records show old nameservers: Propagation may still be in progress. Use
dig NS yourdomain.comto see what your local resolver sees. If it’s been over 48 hours, re-check your GoDaddy settings. - Site loads but shows a default page: This means DNS works but the web server isn’t configured for your domain. Add a virtual host in Apache/Nginx or a domain in your control panel.
- Email not working: Ensure you have the correct MX records in your VPS DNS zone. If you were using GoDaddy’s email, you may need to keep MX records pointing to GoDaddy’s mail servers.
- Nameserver hostname doesn’t resolve: Use a tool like
dig A ns1.yourdomain.com. If it fails, your DNS zone on the VPS is missing the A record.
Frequently Asked Questions
Can I point my GoDaddy domain to a VPS without changing nameservers?
Yes, you can simply add an A record for your domain in GoDaddy’s DNS settings pointing to your VPS IP. This is easier and often sufficient if you don’t need advanced DNS features. However, using custom nameservers gives you more control and is required for some hosting setups.
How long does it take for nameserver changes to propagate?
Usually 24-48 hours, but it can be faster if you set a low TTL before making the change. The global DNS system caches old records, so propagation time varies by location.
Do I need two nameservers?
It’s strongly recommended for redundancy. If one fails, the other still resolves your domain. Many registrars require at least two.
Can I use the same IP for both ns1 and ns2?
Technically yes, but it defeats the purpose of redundancy. If the VPS goes down, both nameservers are unavailable. Use a second IP if possible.
What if I already have a website on GoDaddy’s hosting?
Changing nameservers will stop GoDaddy’s hosting from serving your site. Make sure your VPS is fully set up before making the switch. You can also keep GoDaddy’s nameservers and just change the A record to point to your VPS.
Is it better to use GoDaddy’s nameservers or custom ones?
Custom nameservers give you more control and are often required by VPS hosting providers. However, GoDaddy’s nameservers are simpler if you don’t need advanced DNS management. For most users, using a third-party DNS service like Cloudflare is the best balance.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.