Hosting email with cPanel with your domain pointed elsewhere

Cover cPanel Webmail

This is a guide on how to host your business email with cPanel where your domain is pointed to another server.

Conditions

  • you have a WHM/cPanel server
  • your domain name server – yourcompany.com is setup on AWS, DigitalOcean or other server
  • you want to use cPanel as your email server

Setting up your domain zone records

Below are the records you need to add to make this work

Setting up your domain DNS records

SPF record

Hostname: yourcompany.com Type: TXT Value: v=spf1 +a +mx +ip4:123.123.123.123 ~all

Dmarc record

Hostname: _dmarc.yourcompany.com Type: TXT Value: v=DMARC1; p=quarantine; sp=none;

Webmail record

Hostname: webmail.yourcompany.com Type: A Value: 123.123.123.123

Mail record

Hostname: mail.yourcompany.com Type: A Value: 123.123.123.123

MX mail record

Hostname: yourcompany.com Type: MX Priority: 0 Destination: mail.yourcompany.com

Notes

  • replace yourcompany.com with your website domain
  • replace 123.123.123.123 with your cPanel IP address
  • TTL can be set to 3600

Setup an addon domain in cPanel

Setup an addon domain in cPanel
cPanel addon domain interface

Fill in the new domain name, the other 2 fields will be auto-generated.

Setup the mailbox in cPanel

cPanel email interface
cPanel email interface
cPanel email settings
cPanel email settings

Once you have done added your addon domain, go to Email Accounts. Click on Create New. Fill in the details.

Wait for 12~24 hours

If you have successfully completed the above steps, you should be able to send and receive email with your new email address.

For advanced testing, you may use the below tools

Test your email

cPanel email startera
cPanel email settings

Launch your email with RoundCube or Horde.

To test if it is working, send an email from the new email address to your personal email. Reply an email from your personal email.

If you managed to send and receive the email, then you have your new email setup successfully.