Connect your domain to hosting:DNS and nameservers explained
Connect a domain to your website without losing email. Learn when to change nameservers and when to update DNS records.

On this page
The short answer
To connect a domain to hosting, either update its A/AAAA and CNAME records at the current DNS provider or change its authoritative nameservers. Before changing nameservers, copy all required records, especially email and verification records.
What do nameservers actually do?
Authoritative nameservers publish a domain’s DNS records. Those records tell browsers how to reach a website and mail servers how to deliver email. A domain registrar manages the domain registration and the nameserver delegation; the DNS provider manages the records themselves. These may be different services.
Changing a nameserver is different from changing a website’s IP address. A nameserver change hands responsibility for the entire DNS zone to another provider. An A-record change alters one destination while leaving the DNS provider in place.
Choose the right connection method
If you want to keep your existing DNS provider, obtain the destination address or hostname from your hosting account. Update the root domain’s A record for IPv4, its AAAA record only when a supported IPv6 destination is supplied, and the www CNAME or A record as directed. Do not copy an example IP address into a live record.
If your hosting service will manage DNS, create the complete zone at the destination first. Then enter the exact assigned nameservers at your registrar. Do not guess nameservers from another customer’s guide or an old screenshot; the correct values come from your active account or support team.
Protect email before making the change
Export or record every existing DNS entry. Pay particular attention to MX records, SPF, DKIM, DMARC, CAA, and service-verification TXT records. Forgetting these can interrupt email or break external services even when the website appears to work.
- Confirm you can sign in to the registrar, DNS provider, and hosting account.
- Back up the current zone and note the existing nameservers.
- Create the destination records and check them against the hosting instructions.
- Plan the DNSSEC transition before changing nameservers. A DS record at the registrar must match the keys used by the authoritative DNS provider.
- Change either the records or the delegation, according to the method you selected.
- Check the root domain, www, email delivery, and HTTPS from more than one network.
If the DNS providers do not support a coordinated signed migration, follow their procedure to remove the old DS record at the registrar and wait for its cached TTL to expire before changing nameservers. Keep the old zone working during that wait. Once the new delegation is stable, enable DNSSEC at the destination and publish its new DS record. Removing the DS record creates a temporary period without DNSSEC protection; use a supported signed migration when your requirements call for uninterrupted validation.
Understand the waiting period
DNS changes do not reach every visitor at the same instant. Recursive resolvers can keep an old answer until its cached time-to-live expires. Nameserver delegation and individual records may have different caching behaviour. Lowering a TTL helps only after the previous TTL has itself expired.
Keep the old website and email service available during the transition. Repeatedly switching nameservers makes diagnosis harder. If one network sees the new site and another sees the old one, inspect the authoritative response and the cached response separately.
Verify the result instead of guessing
Use a DNS lookup tool to check the authoritative nameservers and expected records. Check for an unexpected AAAA record when IPv4 works but some visitors still fail. Test the SSL certificate for both the root and www hostnames. If the web server is shared, the server must also be configured to recognise your domain.
For a Hostlelo account, open your current service details in the client area or ask support for the assigned DNS values. Our nameserver-change checklist covers the transition in more detail.
Reader questions
Should I change nameservers or just the A record?
Change the A/AAAA or CNAME records when keeping the current DNS provider. Change nameservers when moving authoritative DNS management, after copying the full zone.
Why did my email stop after a nameserver change?
The new DNS zone may be missing MX or email authentication records. Compare the old and new zones and restore the records supplied by your email provider.
Can I use any Hostlelo nameservers from an old guide?
No. Use the exact nameservers assigned to your current hosting service. Nameserver values can differ by platform and account.
Sources & further reading
Originally published . Revised for this edition.


