I had a problem on how to configure my domain host records so that my website and email could be hosted on different servers. I found out that my email couldn’t receive email sent by others. I tried to look at my domain host records but I thought I had set them up correctly. So I was stuck for a few hours until I contacted Namecheap support and they give a quick and working solution which is a really simple thing that I didn’t think of.
So to avoid confusion when setting up your host records, you can follow this tutorial. I use Namecheap as example, but the settings on other registrar should be similar.
1. Log in to your domain registrar and click the domain you want to manage.
2. Switch your domain name servers to your domain registrar.
If you have already set your domain name servers to your domain registrar, you can skip this step. If you set your domain name servers (DNS) to your web hosting name servers before, you can still set your domain host records via hosting cpanel. But it’s a lot easier if you switch your DNS to your domain registrar since all the settings will be done from your domain registrar account. If you’re on Namecheap, you can follow this tutorial. Please note that this change might take up to 24 hours before it reflects your actual domain name servers on the internet.
3. On your domain settings page, click “All Host Records” under host management subtitle on the sidebar.
4. Set up your domain host records.
You will be given this page where you can set up your domain host records.
For the @ and www host name, you have to select “A (Address)” record type. This was my problem. I set it to CNAME record type and I was told by Namecheap support that CNAME blocked my Mail Exchange (MX) settings so I couldn’t receive emails. It has to be set as A record type to make the MX settings work.
Under IP Address/URL column for the @ and www host name, enter your web hosting IP address. You can ask your hosting provider to get this information.
Under sub-domain settings, if you want to host your email on different server, you can add mail as host name, select A record type, and then enter your email hosting IP address under IP Address/URL.
Then under mail settings, since I use Namecheap Private Email, I only need to select Namecheap Private Email option and it will be set up automatically. If you host your email somewhere else, select “I will specify my own MX records”. After you click “Save Changes”, a new MX records settings box will appear.
In the same row, enter ‘@’ as hostname and mail.yourdomain.com as mailserver host name. Make sure the mail.yourdomain.com IP Address has been set up under sub-domain settings earlier. Then click “Save Changes”. The MX Pref and TTL box will be filled automatically.
Please wait a few hours before this change take effects especially if you just switch your DNS back to domain registrar. Restart your router and flush your computer DNS to speed up the process. Test your settings by sending a test email to email address that you already set up on your email hosting. If your domain host records are set up correctly, the test email will arrive.
So that’s all necessary steps to have your website and email hosted on different servers. If you have any problem, leave a comment below and I will try to help you.