Setting up email on your own domain
Learn how to create email addresses at your own domain name using cPanel, Microsoft 365 or Google Workspace. This guide covers choosing a provider, configuring DNS records, and connecting your devices to receive mail.
You get email at your own domain by choosing where your mailboxes will live, creating them, and pointing your domain’s DNS to that provider with correct MX and authentication records. On Hostworld’s cPanel hosting you create mailboxes in cPanel, publish SPF and DKIM, add DMARC in DNS, then connect your devices with IMAP and SMTP.
This picks up from a domain you already own and can change DNS for at your registrar or DNS host.
Before you start
- Decide where the mailboxes will live. Your options: Hostworld cPanel hosting, Microsoft 365 or Google Workspace. The DNS you publish depends on this choice.
- Know who hosts your DNS. If you point your domain to our nameservers, cPanel can write SPF and DKIM for you. If you keep DNS elsewhere, you will copy values from cPanel into that DNS.
- Plan cutovers. Lower MX and related record TTLs well before you switch, so caches drop sooner. Raise TTLs afterwards once stable.
- Cloudflare users: MX records are always DNS only. Any A, AAAA or CNAME that your MX or mail clients use must be DNS only as well. Turn the orange cloud off for mail hostnames. Proxied mail hostnames break SMTP and IMAP.
- cPanel Email Routing matters. If a cPanel account has Email Routing set to Local while your MX points to Microsoft 365 or Google, mail sent from that server to your domain will deliver locally and disappear. Set routing to match reality.
- Authentication is not optional any more. Publish a single SPF TXT record, enable DKIM, and add DMARC. Gmail and Yahoo increased enforcement for bulk senders in 2024, and even smaller senders see better inboxing with SPF, DKIM and DMARC in place.
- Forwarding to external mailboxes can fail SPF or DMARC unless the server rewrites the envelope sender with SRS. If forwarding is essential, plan for SRS or use client-side fetch.
- IMAP keeps devices in sync. POP can delete mail from the server, which surprises people. Choose IMAP unless you need one-device storage.
- Deleting an email account in cPanel is permanent. All stored mail is removed. Confirm before you delete.
Step 1: Decide where your email will live
You have three common routes:
- Hostworld cPanel hosting: Create mailboxes in cPanel. We recommend this if you already use our shared, reseller or WordPress hosting. You manage mailboxes in cPanel and read mail in webmail or an email client.
- Microsoft 365: Use Exchange Online. Microsoft provides tenant-specific MX and Autodiscover records, and you create users in Microsoft 365 before changing MX.
- Google Workspace: Use Gmail with your domain. Follow the Admin setup flow for the exact MX values. Do not mix old and new MX sets.
The rest of this guide covers our cPanel route first. Microsoft 365 and Google Workspace are covered later for comparison.
Step 2: Confirm who hosts your DNS and prepare for changes
Find where your domain’s nameservers point. If you want Hostworld to manage DNS for your cPanel hosting, change your domain’s nameservers at your registrar to our cluster:
- ns1.serverworld.uk
- ns2.serverworld.uk
- ns3.serverworld.uk
- ns4.serverworld.uk
When your domain uses these nameservers, cPanel can publish or fix SPF and DKIM automatically in Email Deliverability. If you prefer to keep DNS with your registrar or a third party, that is fine. You will copy the exact TXT and CNAME values that cPanel shows into your external DNS.
Lower TTLs on existing MX, SPF, DKIM and DMARC records before you switch. One hour is a reasonable working value. This shortens the cache time at resolvers so changes take effect sooner. After the move, raise TTLs to reduce needless query load.
Step 3: If using Hostworld cPanel, set Email Routing to match your plan
Email Routing tells the cPanel server whether to deliver mail for your domain locally or to send it onwards. This prevents mail vanishing into the wrong place.
- In cPanel, open Email Routing for your domain.
- If you will host mailboxes in cPanel, select Local Mail Exchanger.
- If your MX will point to Microsoft 365 or Google Workspace, select Remote Mail Exchanger. This avoids local delivery on the web server.
- Avoid relying on Automatically Detect Configuration. It reads only the local DNS zone and does not perform external lookups. It will not re-detect later if you change DNS off the server.
Step 4: Create your mailbox in cPanel
In cPanel, go to Email Accounts and add your address and password. Choose a sensible quota. Use a strong password because IMAP and SMTP will be exposed to the internet. You can access Roundcube webmail right away via /webmail on your domain or port 2096, or by clicking Check Email next to the mailbox in cPanel.
Note: deleting an account in Manage Email Accounts permanently removes all mail stored for that address. There is no undo.
Step 5: Publish and check DNS for cPanel-hosted mail
This step makes the rest of the world send your mail to your cPanel server, and tells receivers how to authenticate messages from your domain.
5.1 MX: deliver mail to your server
- If your domain uses Hostworld nameservers, cPanel normally maintains the MX record when Email Routing is set to Local. Check it in Zone Editor.
- If your DNS is external, set the MX to the host that handles mail for your cPanel account. You can see the correct value in your cPanel zone or from your hosting welcome details. Do not point an MX to a CNAME. The MX target must resolve directly to A or AAAA records.
- Remove old MX entries that point elsewhere once you are ready to cut over. Multiple MX records are fine if they all point to the same system. Mixed destinations cause split delivery.
5.2 SPF: publish one TXT
- Open Email Deliverability in cPanel. If your DNS is on our nameservers, click to install or repair SPF. If your DNS is elsewhere, cPanel will display the exact TXT value to publish at your DNS host.
- SPF must be a single TXT record for your domain. Do not publish more than one SPF TXT at the same name. That causes a permanent error.
- Keep the total number of SPF lookups at or below ten across all mechanisms that trigger DNS queries. Too many includes and redirects will break SPF.
5.3 DKIM: enable it in cPanel
- In Email Deliverability, enable DKIM. If your DNS is on our nameservers, cPanel will install the record. If DNS is elsewhere, copy the displayed DKIM record to your DNS. cPanel shows either a TXT or CNAME to publish depending on configuration.
5.4 DMARC: add it in DNS
- DMARC is not created automatically in cPanel. Add a TXT record at
_dmarc.yourdomainwith a policy. Start with monitoring, then move to enforcement once SPF or DKIM alignment is reliable.
Example starter record for monitoring under the current DMARC spec:
_dmarc.yourdomain.tld. 3600 IN TXT "v=DMARC1; p=none; t=y; rua=mailto:[email protected]"
t=ymarks the record for testing under the 2026 revision of DMARC. The olderpct=tag is obsolete in the new RFCs.- If you send aggregate or failure reports to another domain, that destination must authorise your domain. They publish a special TXT at
<your-domain>._report._dmarc.<their-domain>. Without it, receivers may ignore those report URIs. - Modern DMARC policy discovery walks the DNS tree rather than using the Public Suffix List. Keep the record at the organisational domain unless you have a reason to set it lower.
Step 6: Connect devices and clients to cPanel mail
In cPanel’s Email Accounts, use Connect Devices (also shown as Set Up Mail Client) for each mailbox. It provides ready-made settings and autoconfig downloads where supported, plus the manual details.
- IMAP: port 993 with SSL/TLS. Recommended if you want the server and all devices in sync.
- SMTP: port 465 with SSL/TLS or port 587 with STARTTLS. Authenticate with the full email address and its password.
- POP: port 995 with SSL/TLS. Use only if you understand that some POP clients delete mail from the server after download.
Roundcube webmail is available at https://yourdomain.tld/webmail or on port 2096.
Step 7: Use Microsoft 365 instead of cPanel mail
If you choose Microsoft 365, follow Microsoft’s domain wizard. Key points:
- Create your users and mailboxes in Microsoft 365 before you change MX. Once you change MX, all email for your domain will flow to Microsoft 365 immediately.
- Set the MX to the tenant-specific host Microsoft provides. It has the form
<domain-key>.mail.protection.outlook.com. Copy it exactly from the wizard. - Add the Autodiscover CNAME to
autodiscover.outlook.com. This improves client setup. Remove or adjust any cPanel autodiscover or autoconfig records that would conflict. - Publish the DKIM CNAMEs Microsoft provides, then enable DKIM in Microsoft 365.
- TTL values under six hours are supported by Microsoft 365. Lower TTLs help while you migrate.
- In your Hostworld cPanel account, set Email Routing to Remote for the domain. This stops local delivery on the web server.
Step 8: Use Google Workspace instead of cPanel mail
If you choose Google Workspace, use the Admin setup flow and copy the records it shows. Key points:
- Create your users in Google Workspace before you change MX.
- Use the MX values shown in your current Google Admin flow. New setups show a single MX of
smtp.google.com. Do not mix this with the legacy five-record set. Follow Google’s current guidance for your tenant. - In your Hostworld cPanel account, set Email Routing to Remote.
- Adjust any conflicting cPanel
autodiscoverorautoconfigrecords if your clients will rely on Google’s discovery mechanisms.
Step 9: Test DNS and mail ports
These checks confirm that your records are live and that you can reach the right ports. They do not send messages. They show what your resolver sees and whether your network can connect.
Check MX
This query asks DNS for your domain’s MX.
- Linux/macOS:
dig +short MX yourdomain.tld
- Windows PowerShell:
Resolve-DnsName -Name yourdomain.tld -Type MX | Select-Object -ExpandProperty NameExchange, Preference
Check SPF
This query asks for the SPF TXT at the root of your domain.
- Linux/macOS:
dig +short TXT yourdomain.tld | grep -i "v=spf1"
- Windows PowerShell:
Resolve-DnsName -Name yourdomain.tld -Type TXT | Where-Object {$_.Strings -match "v=spf1"} | Select-Object -ExpandProperty Strings
Check DMARC
This query asks for the DMARC TXT at _dmarc.
- Linux/macOS:
dig +short TXT _dmarc.yourdomain.tld
- Windows PowerShell:
Resolve-DnsName -Name _dmarc.yourdomain.tld -Type TXT | Select-Object -ExpandProperty Strings
Test port reachability
These tests confirm that you can reach IMAP and SMTP on the right host and port. Replace mail.yourdomain.tld with your actual incoming or outgoing server name.
- Linux/macOS (if OpenSSL is installed):
openssl s_client -starttls smtp -connect mail.yourdomain.tld:587 -servername mail.yourdomain.tld
openssl s_client -connect mail.yourdomain.tld:993 -servername mail.yourdomain.tld
- Windows PowerShell:
Test-NetConnection -ComputerName mail.yourdomain.tld -Port 587
Test-NetConnection -ComputerName mail.yourdomain.tld -Port 993
If these fail, recheck firewalls and that you used the exact server names and ports from cPanel’s Connect Devices page or your provider’s setup flow.
Step 10: Be cautious with forwarders and aliases
Forwarding a copy of in-bound mail to external mailboxes can cause authentication failures. When a server forwards without SRS, the forwarded copy often fails SPF and may be rejected or marked as spoofed by Gmail or Yahoo. If you need a forwarder:
- Prefer client-side fetch in the destination mailbox.
- If you run your own cPanel server, enable SRS in WHM’s Exim configuration. On shared hosting, ask us about options.
- For significant volumes, use a proper mailing platform and follow their guidance on authentication and unsubscribe handling.
Step 11: Optional transport security signals
MTA‑STS and TLS Reporting improve TLS in transit. They are optional but useful for domains that send or receive at scale.
- MTA‑STS asserts a policy that receiving servers should use TLS when delivering to you. It needs a policy file on HTTPS and a DNS TXT record.
- TLS‑RPT asks receivers to send you daily reports of TLS issues they saw when delivering to you. It is a DNS TXT record with a report URI.
These strengthen your posture beyond SPF, DKIM and DMARC.
What next
If you are hosting mail with us and want the click-by-click in cPanel, the Email Accounts, Email Routing, Zone Editor and Email Deliverability screens are the ones you will use. If anything does not match what you see, or you are unsure of your MX target or authentication values, please open a support ticket and we will check your account.
If you are weighing up running mail on your own VPS, see our VPS guides or look at our UK locations on Linux VPS. Mail servers require careful DNS and authentication. If you prefer to keep it in cPanel, that is fine.
Common questions
Do I have to move my DNS to Hostworld to use cPanel mail?
No. If your DNS stays elsewhere, use cPanel’s Email Deliverability to view the exact SPF and DKIM values, then publish them at your DNS host. Set your MX to the correct mail host for your cPanel account and remove old MX entries. In cPanel set Email Routing to Local.
My site is on Hostworld but I want Microsoft 365 or Google Workspace for mail. What do I change?
Keep your website records as they are. Change the MX to the value your provider gives you. Add any required Autodiscover and DKIM CNAMEs. In cPanel set Email Routing to Remote so the web server does not try to deliver locally. Lower TTLs before you switch, then raise them after.
Mail sent from my site to my own address vanishes. Why?
On a cPanel account this usually means Email Routing is set to Local while your MX points to an external provider. Change Email Routing to Remote for the domain. The auto-detect option looks only at the local zone and can be wrong if your authoritative DNS is external.
What are the correct ports and should I use IMAP or POP?
IMAP on port 993 with SSL/TLS, and SMTP on port 465 with SSL/TLS or 587 with STARTTLS. Use IMAP to keep mail on the server and in sync across devices. POP on 995 can be configured to delete messages from the server, which many people do not want.
How long do DNS changes take?
Resolvers cache records based on their TTL. Lowering TTL ahead of a change shortens the wait. After a cutover, caches will pick up the new values as their current TTLs expire.
Gmail or Yahoo are junking my messages. What should I check?
Make sure you have a single valid SPF TXT, DKIM enabled and a DMARC record. Align your From domain with SPF or DKIM. For bulk mail you also need one‑click unsubscribe and low spam rates. Authentication is increasingly expected even for smaller senders.
I am using Cloudflare and my mail stopped working
MX records must be DNS only. Any hostnames used by MX targets and by your IMAP, POP or SMTP settings must be DNS only as well. Turn the orange cloud off for those records in Cloudflare.
If you need help at any point, please open a support ticket and tell us your domain and which route you are taking. We will review your DNS, routing and account settings with you.