How to Send and Receive Emails using Your Own Domain with Cloudways, ServerPilot, Unmanaged VPS or without a Host

If you are hosting your website using Cloudways or ServerPilot, you probably realize they do not have a free built-in email server to use with your domain. What that means is you will not be able to send and receive emails via [email protected].

Though you’d get better performance with Cloud VPS, you have limited options when it comes to a mailbox using your own domain. A full blown email server is not free and definitely not easy to set up.

Now Cloudways and ServerPilot both offer free SMTP service that essentially allows you to integrate Gmail account to the application via SMTP authentication –but you can only use whatever email address you already have at Gmail; if that’s the case then I either have to make a new gmail account or the contact page of Custom PC Guide.net would look something like this –“Hi guest, if you have any questions please send a message to [email protected]“.

Yeah… NO. I definitely prefer something like [email protected] instead.

In this case, my option with Cloudways would be using Rackspace email service which costs me $1 for each email address every month. Or per ServerPilot –as outlined here in ServerPilot’s community— provides several options which varies from email forwarding services to $4/mo FastMail.fm service or $20/mo Cpanel add-on server.

So the good news after this article, you don’t need to pay to get an email address of [email protected]. The great news is you can both send and receive emails via that address. The best news is it will be integrated into your existing Gmail or Hotmail account seamlessly. The blessed news is you can create as many addresses as you want and it’s still free. The bad news is, it’s going to be a long read.

This is how it works:

Mailgun has changed their pricing for the worst and does not allow free email routing service. This article now no longer applies, but still can be used to learn the rope. Please visit the alternative Forward Email, it has similar configuration steps to mailgun and a detail guide to follow.

Mailgun offers a Free plan for email routing. Technically, Mailgun acts as a secured post office for your mailbox. If someone sends an email to [email protected], that email will be redirected to my Gmail account. Very simple.

How about sending email? Yes, I can definitely send emails right from my Gmail account under the address [email protected]. You can choose this option later in the Compose window.

My customers/readers will never know that I’m actually using Gmail to manage the messages that they send to [email protected].

Now the catch for this free plan is you are limited to 10,000 email sent per month. Cheesus if you really send that many emails per month, I’m sure you can afford to pay an extra $0.00050 per additional email sent within that period. Another bad news is you must have a credit card on file to send emails to everyone. The reason behind this is Mailgun has to enforce some way to discourage malicious bots from abusing the system for spams.

You can still send emails without a credit card on file, but the recipients must be on the Mailgun’s whitelist a.k.a Authorized Recipients. Now having a payment method saved does not mean it’s going to cost you anything, it will be free until you reach 10,001 emails sent.

Here is how much it costs to send 100,000 emails via your own domain email using SMTP authentication (connected to a gmail or hotmail account)


Alright, if this what you want to do then let’s get started. First, these are the requirements :

  1. You must be able to change DNS records of your domain. I’ll be using Cloudflare DNS editor in this guide. Your interface may look different but it will essentially be the same. I recommend parking your domain with Google Domain (free domain privacy) if you don’t use Cloudflare.
  2. You need to create a throw-away email account or just use a different email account (B) other than the main gmail/hotmail account (A) for verification and confirmation.

Now looking at these requirements, I’m sure the lightbulb just went all halo in your brain. That’s right, we don’t even need a host at all; meaning if you buy a domain for $2.99 from GoDaddy, it’s everything you need to have custom email addresses from your personal domain now.

I – Sign Up and Set up a Mailgun account

  1. Head over to Mailgun and register yourself an account. You don’t have to type in credit card information right now. Remember to using the secondary email (B) for registration. Mailgun may send you an email to that address for confirmation and a text to your phone number for verification.

  2. When all said and done, time to Add Your Domain.

Mailgun advises using a subdomain to avoid messing up your root domain’s MX records. But if you are on Cloudways/ServerPilot or on your own at DO/Vultr/Linode, you probably don’t have an email server to point those MX records to anyway. Plus, using a subdomain here will potentially create more problems for you in the future hence go ahead and put your root domain in the box.

In this example, I’ll be using Local Success.org for demonstration.

On the next screen, you will come across your first and most challenging step in this entire guide.

  1. What you’re seeing here is the complete information that must be set up in your domain’s DNS records.

Logon to your domain panel and look for the DNS editor. If you have Cpanel it is known as Advanced Zone Editor. If you are using Cpanel, I wonder why you need to do this anyway since Cpanel provides a built-in email server already. Perhaps, you are transferring website to its new home.

Since I have appointed my nameservers to Cloudflare’s, I will be using Cloudflare DNS editor instead. As I have mentioned, the interface looks a bit different but it is essentially the same process. There are two records that requires your attention:

  • One MX record that has your root domain name.
  • One TXT record that starts with v=spf1…

Step by Step - DNS Editing via Cloudflare for Mailgun

You will be replacing the two record above with mailgun’s value. Be sure to create a local backup to notepad before you make any changes.

You then need to add 3 more records including a CNAME, a TXT and one more MX.

  1. Once that’s done. Click Continue to Domain Overview. One the next page, scroll down and click Check DNS Record Now.

If everything checks out, you are ready to create a route for an email of your choice at your domain now. Here I have a screenshot of successful Custom PC Guide’s records.

Note that DNS propagation may take up to 72 hours, depend on your domain server. Fortunately, it only takes a few second for Cloudflare to complete. Therefore, if you use another domain server to configure your DNS, make sure the values you input from Mailgun are absolutely correct in order to void further changes which consumes a ton of time.

  1. Create a new route. On this page, there are 3 main infos you need to fill out.

First, choose Match Recipient for Expression Type. This means Mailgun will catch any email that sends to the matching email address declared in Recipient, then redirect it to the final destination provided in Action -> Forward input. That would be your Gmail or Hotmail address.

At this point, I’m sure you have realized that you can now create any email @yourdomain you want, as many as you want; simply by repeating step 5 over and over again.

  1. The last step here is creating a SMTP credential in order to allow Gmail / Hotmail server to send email under your new email address. If you don’t want to, you can skip this step and jump to section II.

Otherwise go to Domains, then click on your domain. Continue to Manage SMTP credentials » New SMTP Credential.

Follow through to create your first STMP account. Remember the username and password for later use.

II – Connect Mailgun to Gmail / Hotmail

  1. Go to the Settings > Account and Import section of your Gmail Inbox. Click Add another email address.

  1. Fill out these two boxes. The second one is your new email address @yourdomain.com that you declared in section I > step 5 above.

The next window is going to require the SMTP credential you have just created previously.

That’s it! You are all done. Click Compose and choose your new email address under From section, then send a test email to the throw-away account to make sure everything works fine.

  • You can do the same thing for Hotmail account via Connected accounts option in your mailbox.
  • If you are running WordPress, you now can install WP Mail SMTP plugin to reconfigure the WordPress’s default method of sending emails to secured Mailgun SMTP connection. Otherwise, WordPress would not be able to send emails.

If you have any questions please send a message to [email protected]. Just kidding haha. I don’t own that email address. Drop a comment below instead.

Staff-Pick Promo Codes

*These discount codes are shared by Glitch Deals Hero, our sister site from another neanderthal great grandfather twice removed.

Leave a Comment.

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


15 Comments
  1. April 1, 2020
  2. March 19, 2019
    • March 20, 2019
  3. January 26, 2019
    • January 30, 2019
  4. January 8, 2019
    • January 10, 2019
  5. August 19, 2018
    • August 24, 2018
  6. May 18, 2018
    • May 18, 2018
      • December 29, 2018
    • May 18, 2018
  7. March 2, 2017
    • March 12, 2017