Skip to content

Connect a domain to a website without breaking email

A practical DNS change checklist: preserve email records, follow the hosting provider's targets, and verify the website and mail afterward.

By Astra Devs Cloud · Updated

Quick answer

Record the existing DNS zone, keep the email provider's required records, and change only the website records your hosting provider specifies. If you change nameservers, recreate the required records in the destination zone before switching.

Find the active DNS provider first

The domain registrar and DNS provider may be different companies. Check which nameservers the domain uses and identify the account that manages that zone. Editing a dormant zone at the registrar will not update the records the world sees.

Make a record of the current configuration and the provider's website connection instructions. Include the root domain, www, mail and verification records. Keep sensitive account details out of support messages; a description of the record types and the problem is usually enough to start.

Know which records you are changing

A records point to IPv4 addresses; AAAA records point to IPv6 addresses. CNAME records reference another hostname. MX records direct incoming mail, and TXT records commonly carry email authentication or ownership verification values. NS records identify nameservers.

A hosting provider may specify different targets for the root and www. Follow those exact targets. Do not assume every provider uses the same records or that changing an A record alone completes setup.

Prepare a reversible change

Keep a copy of the existing zone and decide which records need to change. If you are only connecting a website, retain the email configuration. If you are moving DNS providers, build the destination zone with all required services before changing the nameservers.

  • Confirm ownership access to the domain and the active DNS zone.
  • Save the current records and note their TTL values.
  • Copy the hosting provider's exact website and verification targets.
  • Preserve the mail provider's required MX and TXT records.
  • Avoid removing unrelated subdomains or service verification records.
  • Keep the old configuration available while you verify the result.

Verify the complete result

Check both the root domain and www over HTTPS. Confirm they show the intended site and that the certificate is valid. Then send a test message to the domain and reply from it. A working homepage alone does not prove email still works.

DNS caches can retain old values until their TTL expires. Check authoritative answers and a second resolver before repeatedly changing records. If results differ, compare them with the intended configuration and the saved previous values.

When to ask for help

If you cannot identify the authoritative provider, the new target is unclear, or mail stops working, pause further changes and contact the relevant provider. Explain the intended website target, the records changed and what failed. Do not share registrar passwords, mail credentials or app secrets.

This is a general DNS preparation guide. Cloud website hosting remains in preparation; this checklist does not imply a hosting plan is available to buy.

Sources and further reading

General reference sources explain the underlying concepts. Astra product availability is described separately and may change.

Choose the Astra service for your project.

One team, three distinct offers. For a business website, visit Astra Web Dev. Hosting included in a Web Dev plan does not require an extra Cloud subscription. Accounts, billing and support follow the service you choose.

Ask Astra

Guidance and shortcuts for Astra Cloud.