How to Create Custom Domain Email Addresses for Free with Mailgun

When starting a new business, it’s best to minimize your operating costs as much as possible. This reduces your financial risk to start your new endeavor. It also gives you an edge against your competitors because you can offer lower prices to attract the market’s attention. Still, there are some services that a budding business can’t go without. One such service is custom domain email addresses.

Most businesses choose to just follow the crowd and sign up for a Google Business account. They assume there is no alternative and commit to paying the monthly fee. Well, I’m here to let you know there is another way! It just takes a little bit of upfront configuration, same as getting set up with any service.

If your business handles less than 1,250 emails per month, then you can create custom email addresses at your website’s domain for free. All you need is a free Gmail and Mailgun account.

Add SMTP User Accounts in Mailgun

First, you must add email user accounts for your domain in Mailgun. To do this, sign into Mailgun and navigate to Sending > Domain settings. Now click the tab titled “SMTP credentials”. You should see there is already an entry for [email protected]. If the domain is not what you were expecting, ensure the correct domain is selected in the top-left of the screen.

To add another user account, click the button in the top-right of the screen titled “Add new SMTP user”. You can then enter the username you would like to create, which is the part before the @-sign.

Once created, there will be a notification in the bottom-right of your screen to copy the account’s generated password. If you missed it, don’t worry. Just click “Reset password” and Mailgun will generate a new password again for you to copy.

Continue adding new users and storing their passwords in a secure location. Here are some common email address user names you might want to consider:

  • (Try using your own name or staff members’ names!)

Create an Email Forwarding Rule in Mailgun

To start receiving emails for the custom email addresses you just created, simply create a “Receiving Route” in Mailgun. Here’s how to do it:

  1. In your Mailgun account, click “Receiving” in the lefthand menu.
  2. Click “Create route” in the top-right of the page.
  3. In the edit screen, set “Expression type” to “Catch All”.
  4. Check the box under “Forward” and type the receiving email address, such as your free Gmail address.
  5. If you’d like, enter a helpful note for the “Description” field. For example, I set mine to “Receive all messages at Gmail”.
  6. Click “Save route” at the bottom.

Fantastic! You are now forwarding all emails to your Gmail inbox. Go ahead and give it a try by sending yourself an email! Note that you will only receive messages sent to the SMTP user accounts that you created, though.


If the routing rule was not configured properly, you will receive an error message in Gmail that looks like this:

Google Mail Delivery Subsystem email error message saying: Address not found. Your message wasn't delivered because the address couldn't be found, or is unable to receive mail.
Gmail error message when an outgoing email could not be received.

If the SMTP user account was not configured properly in Gmail, then the email message will silently fail. An error will not be displayed, but the message will not show up in your Gmail inbox. This is because Mailgun is successfully routing messages, but your Gmail account is misunderstanding where to listen for those messages.

Of course, also ensure you are sending to the correct address by reviewing for typos. To avoid mistakes, copy the full email address directly from the SMTP credentials listing in Mailgun.

Add Your SMTP Accounts to Gmail

Now that you’re able to receive emails at your new custom email addresses, let’s now talk about sending emails from those new accounts. All we need to do is connect them in your Gmail account settings.

To add one of your new SMTP user accounts to Gmail, follow these steps:

  1. Navigate to your account settings in Gmail by clicking the cog in the top-right of the screen. Now click “See all settings”.
  2. Click the “Accounts and import” tab at the top of the screen.
  3. Under the section labeled “Send mail as”, click “Add another email address”.
  4. Enter the sender display name and email address, then click “Next step” to continue.
  5. Now that you’re asked to provide SMTP server credentials, navigate back to Sending > Domain settings > SMTP credentials in Mailgun where your accounts are listed.
  6. At the bottom of the screen, you’ll see a section titled “SMTP settings”. Use these values to complete the Gmail form. It should go something like this:
    • SMTP Server:
    • Port: 587 (most secure and reliable)
    • Username: [email protected] (for example)
    • Password: (the password Mailgun created for the account)
      • If you lost the password, simply click “Reset password” for the address in Mailgun to generate a new one for you to copy.
    • Secured connection using TLS (recommended)
  7. Click “Add account”. If all went well, you will receive a verification email for the newly added address in your Gmail’s inbox.
  8. Copy the code from the verification email and paste it into the input field to complete verification.

Confirm by Sending Some Tests

Now, try replying to one of the test emails you sent earlier when confirming the ability to receive emails. You should be able to select the alias in the From field when composing your reply. Go ahead and send the email, then ensure you receive the email as expected. Once you’ve received the email, be sure to confirm the sender name and address. If you don’t like the sender name, simply click “edit info” next to the alias address in your Gmail’s settings.

Once your tests look good, you now have a fully functional custom domain email address to use as you wish! Just remember to repeat this process for each custom domain email address that you’d like to create.

Is this really FREE?

If you are routing less than 1,250 emails per month, then Mailgun’s SMTP service is indeed free for you under their Flex plan!

For my web development contracting business, I find this to be perfect. I currently don’t blast to any mailing lists or do any other sort of bulk mailing. I simply use my custom email addresses for business communication purposes between my clients and I.

If you exceed the limit one month, the service is still incredibly cheap because additional messages are only $0.001 each. That’s $1.00 per 1,000 extra emails. Since the first 1,250 emails are free, this means it’s actually only $1.00 to handle 2,250 messages via Mailgun! So even if you have a lucrative month, Mailgun won’t charge you a large amount of money. I really appreciate flexible billing plans because there are a lot of uncertainties when starting a small business.

For more information, refer to Mailgun’s pricing page. It has a nifty slider to help you select the plan that’s right for you!

Michelle Blanchette

Michelle Blanchette

Full-stack web developer, specialized in WordPress and API integrations. I single-handedly build elegant software solutions with special attention toward usability, performance, and data privacy. My favorite words are "efficient", "productive", and "simple".