Domains and DNS
Bring your website to the hosting while keeping email with another provider
Sometimes the website moves to your hosting with us, but email has to stay, for now or for good, with the previous provider or another service. You do this by changing only the website's DNS records, as long as email doesn't depend on them.
You need two IP addresses:
- Your hosting's. It's under Login details for the service in the client area. On a multi-account plan each account has its own, and it may differ from your other accounts': check it on the page of the account that will host the website.
- The one of the server where email is today. It's the address of the record the MX currently points to; if in doubt, ask that provider.
Make the changes wherever the domain's DNS zone is: the previous provider, the registrar or a service such as Cloudflare. If you're also moving the domain to our DNS servers, read the last section first.
1. Check where the MX points
Find the domain's MX records.
- If they point to a mail service with its own name, such as Google Workspace (
smtp.google.comoraspmx.l.google.com) or Microsoft 365 (…mail.protection.outlook.com), email doesn't depend on the website. Go to step 3. - If they point to the domain itself (
tudominio.com) or to a name that is a CNAME to it, as is usual withmail.tudominio.com, email depends on the domain's main record and would inherit the change: when you point the website to your hosting, email would start arriving here, where your mailboxes aren't. Continue with step 2.
2. Give email its own record
- Create or edit
mail.tudominio.comas an A record and enter the IP address of the server where email is today. If it was a CNAME, change its type to A. - Edit the MX so that its destination is
mail.tudominio.com. If it already was, leave it alone.
This way email has its own IP address and doesn't move when you change the domain's. If your email provider gives you a server name of its own for the MX (for example mx.provider.com), you can use it instead of mail.tudominio.com: it doesn't depend on your domain either.
Wait until this change is visible before the next one. You can check with any public DNS lookup: mail.tudominio.com should return the mail server's IP address.
3. Point the website to your hosting
- Edit the A record for
tudominio.comand enter your hosting's IP address. - Check
www.tudominio.com. If it's a CNAME pointing totudominio.com, it already follows the change. If it's an A record, change it too. - If there are AAAA records (IPv6) for
tudominio.comorwwwpointing to the previous server, delete them. Otherwise, some visitors will keep reaching it.
4. Check the SPF record
Find the TXT record for tudominio.com that starts with v=spf1. If it contains a (for example v=spf1 +a ~all), that a authorised the previous server because the domain pointed to it; from step 3 it authorises your hosting. If email goes out from that server and the SPF doesn't authorise it some other way (with mx, with its ip4: or with the include: your email provider tells you to use), add its IP address:
v=spf1 +a +mx +ip4:IP_DEL_SERVIDOR_DE_CORREO ~all
Replace IP_DEL_SERVIDOR_DE_CORREO with the IP address you entered in step 2 and keep the other mechanisms your record already had. Leave your email provider's DKIM and DMARC records as they are.
5. Tell cPanel that email is remote
In your hosting's cPanel, go to Email Routing, choose the domain and select Remote Mail Exchanger. If it stays local, whatever the website sends to addresses on your own domain, such as a form's notifications, would be delivered on the hosting and wouldn't reach your mailboxes. It's explained in when to use local or remote routing.
While email is elsewhere, don't create mailboxes for that domain on the hosting: they wouldn't receive anything. For the website's forms to send properly, set them up with authenticated SMTP using a mailbox and the connection details of your email provider.
If the domain moves to our DNS servers
When you change the domain's DNS servers to ours (for example, because you're bringing it along with the hosting), the zone that counts becomes the one in your cPanel's Zone Editor, and the one you had with the previous provider stops being used. Before changing them, create there the email records you have today: the MX to mail.tudominio.com with its A record pointing to the mail server's IP address (step 2), the SPF record and your email provider's DKIM and verification records. Otherwise, email would stop arriving once the change propagates.
Check it works
Changes take anywhere from a few minutes to a few hours to propagate. Then:
- Open the website with and without
www: it should load the one on your hosting. - Send an email to your mailbox from another account and reply from it: it should arrive and go out as before, through your email provider.
- Test the website's forms.
If your email program or phone uses tudominio.com as the incoming or outgoing server, change it to mail.tudominio.com or to the server your email provider gives you. Otherwise, it will try to connect to the hosting and stop working.
For the opposite case, with the website on another server and email on your hosting, follow Point your website to an external server while keeping email on the hosting.
You may also find useful
- Point your website to an external server while keeping email on the hosting Change only the website's DNS records to another provider's server and keep email working on your ho...
- Create and edit DNS records with Zone Editor Edit the DNS zone in cPanel, understand each record type and check the impact before replacing or de...
- Delegate a subdomain with NS records Prepare a subdomain delegation to other nameservers without changing the main domain's nameservers.
- Dynamic DNS, managed from the client area How to create dynamic DNS for a domain without hosting, update its IP through a secure URL and fix p...
Something wrong or out of date? Tell us and we will review it.