Cpanel / WHM Tutorials

How to Configure Email on a Different Host from the Website

How to Configure Email on a Different Host from the Website

How to Configure Email on a Different Host from the Website

Although the common practice is to use the same host account for both email and website, you can run the two services on two different servers.

The article discusses the reasons why you may consider hosting your emails on a different server and how to do the setup.

Why Host the Email and Website on Different Servers

By default, a hosting company provides email functionality with the website hosting. This makes it appears as if the two are inseparable while in the actual sense, they are completely separate services that can run independently of one another.

There are several reasons why you may consider running the two on different servers. These include:

Host a Website on a different host while using Web Hosting Hub for Email Services

A common situation that occurs is when you create a website with a hosting company that uses a proprietary website building program, but does not include email service. You may then decide that you want to have email service and the website hosted in one location – Web Hosting Hub. The transition process may require some time, but you may want to have access to the email service. This means that you will need your website hosted on your old host while the email service is active with with another hosting.

To Improve Reliability and Availability

Hosting the email service with a different provider improves reliability and avoids a complete shutdown when a server fails. If using one server, an outage or shutdown means that your customers and other users will not reach you on the website and email.

This may happen due to a malfunction or when the provider is maintaining the systems. But if they are on different servers, at least one will be functional if the other goes down. In addition, the website developer will not touch the emails hence reducing the chances of something going wrong.

Reduce the Complexities Involved When Moving Hosts

Migrating a website and emails running on the same hosting server to another is more complex and challenging, especially for people who are not conversant. In particular, moving the email accounts is more challenging. However, if they are on a different server, moving the website alone to another host is much easier and does not risk your email accounts and data.

To Avoid Blacklisting Due to Bad Neighbours in a Shared Hosting

If one customer in on a shared hosting server is sending spam, you risk damaging your site’s reputation. This will lead to blacklisting of the shared IP which will consequently block emails from your domain.

Hosting Emails on a Different Server

To host your emails on a different server from that of the website, you need to change the Mail Exchanger (MX) record in your domain’s DNS records. The MX records are the ones that point to the server hosting your email and can be local if together with the website, or remote if on a different location.

To point your email away from your current account, you need to obtain the MX destination details from the provider who will host the emails. With these details you can either delete the existing MX record and add a new one or simply edit the existing. Unlike some other records, MX accepts the name of the mail server only and does not work with IP addresses.

The DNS records may be in another location, but you must have access to them. Some registrars may provide you with an interface to edit the DNS records while others allow you to set your own on a different server away.

For the purpose of this article we will perform the process using cPanel.

How to Configure Email on a Different Host from the Website

How to Configure the MX Records in Cpanel

Log in to the cPanel account using the syntax;

https://yourdomain_name.com:2083 or http://yourdomain_name.com/cpanel.

  1. Enter your username and password.
  2. Navigate to Domains and open Zone Editor

There are two options of working with the MX records. You can either

  1. Add a new MX record or
  2. Modify the existing records by editing the specific fields

Method 1

Adding a new MX record

  1. Open the Zone Editor
  2. If you have more than one domain in your account, select the one you want to modify and click on the Manage option. This will open the zone records for the domain.
  3.  Click the  +MX Record.

How to Configure Email on a Different Host from the Website

This provides with the option to add the Destination server’s Fully qualified domain name and the Priority to assign to the record.

How to Configure Email on a Different Host from the Website

How to Configure Email on a Different Host from the Website

  1.  Enter the DestinationFully qualified domain name such as aspmx.l.google.com for Google or smx1.web-hosting.com for Namecheap.
  2. Once you complete filling the details, click Add AN MX RECORD to save the entry and proceed.
  3. Repeat this for the other records but ensure that you pay attention to the priority according to the provider’s recommendations
  4. Add more records. Ideally, you need at least two but can have more if your host allows it.

If you will host you emails on Google servers, use the following as the destination’s fully qualified domain names.

aspmx.l.google.com
alt1.aspmx.l.google.com
alt2.aspmx.l.google.com
aspmx2.googlemail.com
aspmx3.googlemail.com
aspmx4.googlemail.com

The new server setting takes some hours to be become active. Generally, it takes about 48 hours for the the new server settings to become active. However, this varies according to the provider and some can take as low as 3 hours.

Method 2

Modify an existing MX Record

Instead of adding a new record, you can simply edit the existing and replace the old values with those for the new server.

  1. Log in to your hosting account cPanel
  2. Open the Zone Editor in Domains
  3. Click Manage option on the domain you want to modify.  This will open the zone records for the domain you are modifying.

  1. Click on MX to display a list of the active MX records

How to Configure Email on a Different Host from the Website

  1. Select the record you want to modify and click Edit

  1. Replace the Priority value and the Destination’s Fully Qualified Domain Name with those that the new hosting provider has given you.
  2. Click Save Record.
  3. Repeat the process and change all the other MX records pointing to the old server so that they now point to the new destination.

Change Email Routing settings

Once you configure the MX records to point to the new destination, you need to change the routing. The email routing settings determine how the domain handles outgoing emails and has the following options.

  • Automatically Detect Setting: This enables the server to detect the settings.
  • Local Mail Exchange if the web host is handling the emails
  • Backup Mail Exchanger
  • Remote Mail Exchanger: if you are hosting emails on a different server away from the

To configure email routing;

  1. Login to the cPanel account
  2. Navigate to Email and open Email Routing

          

  1. Select the domain you are modifying. (With new MX records) from the drop down list.
  2. Choose Remote Mail Exchanger optionifusing a different mail server away from host.

  1. Click Change to save.

Conclusion

How to Configure Email on a Different Host from the Website

Most hosting companies tie the email and web hosting together while these are completely separate applications. Although this looks convenient, it may the domain owner the flexibility and freedom to move around the emails. In addition, it increases the probability of completely getting the customer offline in case the website hosting has issues.

To improve reliability and availability, the domain owner can host the emails away from the website. This requires signing up with the reliable email hosting provider, configuring the MX records to point to the new destination server and selecting the remote mail exchanger to route the domain’s incoming emails.

This is all about How to Configure Email on a Different Host from the Website

If you know which ingredient is better than this, let us know in the comments section.

 

About the author

Avatar

jon snow

Jon is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, and currently a content creator for ERRORHAT who loves working with computers and strongly believes in sharing knowledge.

Add Comment

Click here to post a comment