Configure Nameservers for Hosting: Step-by-Step
In this article
Configuring nameservers is the process of telling the global Domain Name System (DNS) which servers are authoritative for your domain. When you host a website or email with a provider, you typically need to point your domain to that provider's nameservers. This guide walks you through the exact steps, from finding the right nameservers to verifying the change, and covers common pitfalls and fixes.
What You'll Need
- Access to the domain registrar where your domain is registered (e.g., GoDaddy, Namecheap, Cloudflare Registrar).
- The nameserver addresses provided by your hosting company (usually two or more, like
ns1.hostingcompany.comandns2.hostingcompany.com). - Your registrar account login credentials.
- Optional: A way to check DNS propagation (e.g., a web-based DNS checker).
Step-by-Step
- Find your hosting provider's nameservers. Log in to your hosting control panel (cPanel, Plesk, or custom dashboard). Look for a section called “Domains,” “DNS,” or “Nameservers.” Copy the nameserver addresses exactly, including any trailing dots if shown (they are usually omitted in the UI). If you can't find them, check the hosting provider's documentation or support page.
- Log in to your domain registrar. Go to the website where you bought the domain. This is often different from your hosting provider. Navigate to “My Domains,” “Domain List,” or a similar section.
- Select the domain you want to configure. Click on the domain name to open its settings. Look for a tab or button labeled “DNS,” “Nameservers,” “Name Servers,” or “Manage DNS.”
- Choose the “Custom nameservers” option. Most registrars show a default setting like “Use default nameservers” or “Parked.” Switch to the custom or manual mode. This will reveal fields where you can enter your own nameserver addresses.
- Enter the nameservers from step 1. Fill in the first field with the primary nameserver (e.g.,
ns1.yourhost.com) and the second with the secondary (e.g.,ns2.yourhost.com). Some registrars allow more than two; add all that your host provides. Do not include “http://” or “https://” – just the hostname. - Save your changes. Click the “Save,” “Update,” or “Apply” button. Some registrars require you to confirm the change via email or a pop-up – follow the prompts.
- Wait for propagation. DNS changes can take from a few minutes to 48 hours to spread across the internet. The domain will continue to work with old records until the new nameservers are fully propagated. You can check the status using a tool like
whatsmydns.netordnschecker.org. - Verify the configuration. After propagation, test your website by visiting your domain. Also, check that email (if hosted) works. If the site doesn't load, double-check the nameservers you entered and that your hosting account is active.
Common Mistakes
- Typing the nameservers incorrectly. A single typo (e.g.,
ns1.host.cominstead ofns1.hosting.com) will break DNS. Copy-paste the exact values. - Using the registrar's default nameservers instead of the host's. If you leave the default (often
parkingor the registrar's own), your domain won't point to your hosting. - Forgetting to update both nameservers. Some setups require at least two; if only one is updated, DNS may be inconsistent.
- Changing nameservers but not adding DNS records. If your hosting provider uses a shared IP and requires specific A records, they may be automatically set when you change nameservers, but sometimes you need to add them manually in the hosting panel.
- Checking too early. DNS propagation isn't instant. Checking a few minutes after the change may show old records, leading to panic.
- Editing the wrong domain. If you have multiple domains, double-check you're modifying the correct one.
Tips
- Write down your current nameservers before changing them. This makes it easy to revert if something goes wrong.
- If your hosting provider offers a “DNS management” tool, use it to add any necessary records (like A, CNAME, MX) before switching nameservers. That way, when the switch happens, everything is ready.
- For email, ensure your MX records are correct at the new host. If you're moving email too, export your old email data first.
- Use a propagation checker that shows results from multiple locations to see if the change is complete.
- If you're using Cloudflare or another CDN, you may need to configure their nameservers instead of your hosting provider's. Check with the CDN for specific instructions.
- Keep a record of the date and time you made the change – this helps you estimate when propagation should be complete.
Troubleshooting
Your website doesn't load after 48 hours. First, verify that the nameservers you entered are exactly what your hosting provider gave you. Log into your registrar and confirm they are saved. Then, check that your hosting account is active and that the domain is correctly linked to your hosting package (sometimes you need to add the domain to your hosting account).
You see a “domain parked” page. This usually means the nameservers are still pointing to the registrar's default. Re-check step 4 and 5. If you changed them, wait a bit longer – propagation may be slow.
Email stops working. When you change nameservers, all DNS records, including MX, switch to the new host. If your email is hosted elsewhere (e.g., Google Workspace), you must add the correct MX records at your new hosting provider's DNS settings. Contact your email provider for the exact MX values.
You get a “DNS_PROBE_FINISHED_NXDOMAIN” error. This indicates the domain is not resolving at all. Check for typos in the nameserver hostnames. Also, ensure you didn't accidentally delete the domain from your registrar.
Changes don't seem to propagate. Try flushing your local DNS cache (on Windows: ipconfig /flushdns; on Mac: sudo dscacheutil -flushcache). Also, test from a different network (e.g., mobile data) to rule out caching on your local router.
You can't find the nameserver settings in your registrar. Some registrars label it “DNS Management” or “Advanced DNS.” If you're still stuck, contact your registrar's support – they can guide you to the exact location.
Frequently Asked Questions
How long does it take for nameserver changes to take effect?
Typically, it takes between a few minutes and 48 hours. The global propagation time depends on your domain's TTL (Time to Live) settings and the DNS servers around the world. Most changes are complete within 24 hours.
Can I use nameservers from multiple hosts?
Yes, you can use up to 13 nameservers, but it's not recommended to mix hosts. Using nameservers from different providers can cause inconsistent DNS responses. Stick to the ones your primary host gives you.
What's the difference between nameservers and DNS records?
Nameservers are the servers that hold the DNS records for your domain. DNS records (like A, CNAME, MX) are the actual instructions that tell the internet where to find your website, email, and other services. Changing nameservers changes where those records are hosted.
Do I need to change nameservers if I'm just moving my website to a new host?
Yes, unless your new host uses the same nameservers as your old one. Usually, you'll get new nameservers from the new host and need to update them at your registrar.
What if I don't know my registrar's login details?
If you've lost access, use the “forgot password” option on the registrar's site. If that fails, contact their support – they may require proof of domain ownership (e.g., verifying a code sent to the domain's contact email).
Can I change nameservers without affecting my website?
There will be a brief period of propagation where some visitors may see the old site and others the new one. To minimize downtime, ensure your new hosting is fully set up before making the switch, and consider lowering the TTL on your DNS records a few days before the change.