How to set up custom email addresses on your web site for free

Are you still using an old Yahoo, Hotmail (now Outlook) or [gasp] AOL account for email on your personal or small business web site?

Having an email address that matches your web site domain establishes trust, credibility, and professionalism. Not having one could mean lost orders and customers.

I’ve tried many of the main email solutions out there, both free and paid versions, and disliked most of them for a multitude of reasons. Google’s G Suite (essentially Gmail for businesses), while one of the best, can get costly quick — $60/yr for each unique account. Yes, you can set up multiple aliases, but only for the same web site and only if they all go to the same email account. So if you need multiple email accounts or have multiple web site domains, the cost escalates significantly.

However, the free Gmail version has a special hidden feature many people are not aware of— the ability to send as external addresses. This means with a bit of setup, you can use the free Gmail account, and both receive mail at me@yoursite.com and send mail from me@yoursite.com. How cool is that?

It does take a bit of work to set up, and requires that you have access to your domain DNS. If you’d rather not do this yourself, I do offer the setup as a paid service. If you have an hour or two to spare and prefer to DIY, read on and I’ll break down and walk through each step in detail.

Ready to get started?


Step 1 — Gmail Account

If you already have a Gmail account you want to use, great! Otherwise, go to https://accounts.google.com/SignUp to create a new one.

If this is for a business, it’s probably best to have a separate account from your personal one. You can also just use the “+” trick* to send in from multiple accounts and filter accordingly. *topic for another day

Step 2 — DNS & CloudFlare Account

You may already know that the internet uses domain name servers (DNS) to keep track of where everything is and direct web and email traffic accordingly. As such, your web site has DNS records that say where to send your email (called MX records).

You’ll need access to the DNS records for your site so you can set them to send to the right place.

If you’ve never changed these before, they’re likely still being handled by the place you purchased the web site (e.g. GoDaddy, NameCheap, Hover, etc). If that’s the case, I recommend transferring your records to a secure managed provider like CloudFlare.

I use CloudFlare for my sites and highly recommend it. Their free tier is excellent and offers full SSL to secure your web site traffic, and their web app makes setting up changes like the DNS for your email super easy.


  1. Create a CloudFlare account: https://www.cloudflare.com/a/sign-up
  2. Add your site to the account

3. For now, you can leave the DNS settings that it adds. We’ll update these later.

4. Select the free plan (note, it does not expire and no credit card is needed)

5. Update name servers. This will transfer management of your web sites’ DNS records from their current place (likely the registrar where you purchased the site) to your CloudFlare account.

For specific help on this step, CloudFlare has instructions for many registrars here: https://support.cloudflare.com/hc/en-us/articles/206455647-How-do-I-change-my-domain-nameservers-

Once this is done, you can move on to the next step.

Step 3—Mailgun Account

Next, you need to configure an account with a service that will do the heavy lifting of managing email sent to and from your web site.

While Gmail is where you view and compose emails, this is the service that does the actual sending and receiving of the emails from your web site domain.

There are several providers that offer this for free, but the current best option is Mailgun. Their setup is quick and easy and gets you 10,000 free emails a month. Perfect for starting out. Plus, if your business grows beyond the 10k emails, they have a ton of really useful features that are worth the cost to upgrade to a paid account.

When creating the account, be sure to use your current Gmail account, NOT the new email account from your domain. They require a verification step that validates your current email, and if you use an email you don’t have access to [yet], you’ll get stuck right off the bat.

If the Gmail account you’re using is not solely for this business/domain, remember to use the + trick to help with filtering your mail.

Go through all the Mailgun set up steps. It’s especially important to get all the domain validations done right away.


  1. Add your web site domain to Mailgun https://mailgun.com/app/domains/new

Important note: even though Mailgun states above to use a subdomain, for our purposes, you will want to use the root domain (e.g. just mydomain.com instead of mg.mydomain.com).

2. Update the DNS records. If you set up a CloudFlare account and added your site to it, now’s when we’ll go back and update it.

2a. If you left this step and are just coming back to it, you can re-access the DNS records needed in Mailgun here: https://mailgun.com/app/domains. Select the web site domain you created and look for this section below. It’ll have all the custom settings you need to add in CloudFlare.

2b. In CloudFlare, you can go here: https://www.cloudflare.com/a/dns. Select the web site domain you created and you’ll see a section like this:

2c. Add each of the DNS records listed on the Mailgun page — there are 5 total: 2 TXT, 1 CNAME, and 2 MX.

Copy/paste each value into CloudFlare, making sure to select the correct record type each time. Watch out for any added white space.

3. Verify the records

After you’ve added all 5 records, click the Check DNS Records Now button on the Mailgun page.

Look for the green checks to make sure they’re completed.

You’ll see a green check mark next to each record in Mailgun when it’s successful

If you’re using CloudFlare, these changes often take affect almost immediately, however they can sometimes take up to 48 hours.

If your settings do not turn green right away, first double-check all the values you entered in CloudFlare against the ones on the Mailgun page. Try the check again in 5–10 minutes, then 1–2 hrs, then the next day.

Step 4—Create your routes in Mailgun

Now that your Mailgun account is set up, your domain is linked, and all validations are completed, it’s time to set up the routes that will actually direct your mail sent to your domain on to your Gmail account.

If you’re jumping back in, you can get to the Mailgun routes page directly here: https://mailgun.com/app/routes

First, create a “catchall” route

These are used to catch all the emails that are sent to your web site that do not match any other route. So, if someone has a typo in your address, for example, or sends to an alias you didn’t think of, these will get picked up by this route, and their email will still get to you.

If it gets to be a problem, e.g. you start getting a lot of SPAM, you can always disable the route or direct it to another account that you can check more infrequently.

So for this one, select the “Catch All” option, click the Forward checkbox, enter your Gmail account, and at the bottom of the form, enter a description (e.g. “My Catchall”) and click the “Create Route” button.

Next, create the friendly face route

This will be the address you make visible on the site, use for company newsletters, and have as the starting point for most email exchanges. The current trend is to use a simple “hello@”—, giving a friendly face to the professional company email.

Depending on your business, there may be an even better front face for the email though. For example, for one of my client sites that has a Paleo Meal service, we chose to use “askthechef@”

For this one, you’ll select the “Match Recipient” option and enter the full email under recipient (e.g. hello@eatfresh.tech). Then click the Forward checkbox, enter your Gmail account, and at the bottom of the form, enter a description (e.g. “Hello”) and click the “Create Route” button.

Finally, create a route for your name

Setup wouldn’t be complete without adding routes for your own name, e.g. “matt@” — and if you have any team members, add them as well!

Advanced Mode: With Mailgun, you can even set up routes based on regex filters: http://blog.mailgun.com/tips-tricks-guide-to-using-regular-expressions-to-filter-incoming-email/

Once you’ve set up your routes, you are ready to RECEIVE emails sent to your web site. Go ahead and try it! Try sending an email from some other account to each of the routes you defined above. For funsies, send one with a typo or something random like “thedoctor@” to make sure your catchall route works as well.

Next, we’ll do the setup necessary to SEND emails from your web site.

Step 5—Set up SMTP credentials

In this step, you will create the credentials that Gmail will use to access your Mailgun account. By default, there is a a “postmaster” credential, but it’s best to leave that for any future app integrations.

From the Mailgun dashboard (https://mailgun.com/app/domains), select your domain, then click the “Manage SMTP credentials” link in the first section under “Domain Information”

For now, set up a custom password for your MAIN account (e.g. the“matt@” address). If you want to go crazy, you can create a credential for each route, but it’s not necessary to go that far. However, if you are creating email accounts for team members, be sure to create at least one separate credential for them to use (e.g. “team@”).

You won’t have to re-enter this password once it’s set in Gmail, and you can always reset it from within Mailgun, so it’s no sweat if you forget it (although you will need it for the next step, so don’t lose it just yet!) It’s recommended you choose a nice long secure password, preferably with a tool like 1Password or LastPass that can generate a strong random one.

Step 6—Set up send from Gmail

Finally. This is the powerful step. With this set up, you’ll be able to reply to people that email you at your web site, and email out directly as well. All from your Gmail account.

Ordinarily, you’d have to pay Google $60/yr. for each custom email address, or use some inferior off-shoot service for this functionality. Once you complete this last step, you’ll be set with the 10k emails/mo for free, for as many email addresses as you want. Boom!

  1. Go to the Gmail accounts settings page.

From your inbox, look for the gear image in top right. Click that, then select the Settings option in the dropdown menu. Next, click the accounts tab.

Note, you’ll need to be on the desktop version of the site to access these settings — they can’t be edited from the Gmail apps or mobile version of the site.

You may also use this direct link: https://mail.google.com/mail/u/0/#settings/accounts

2. Add an account

Click the link labeled “Add another email address” and enter one of the addresses you created in Mailgun, then click the Next Step button

3. Set the SMTP settings

Change the text in the field for SMTP Server to “smtp.mailgun.org”

Enter your full email address to the Username field. Note, this should be the address that you used in Step 5, creating SMTP credentials in Mailgun. So likely hello@ or matt@ or team@, whichever you used.

Enter the password credential that you created earlier as well, then click Add Account

4. Verify the address

So now Gmail will do a verification step to make sure that you have access already to the email address that you’re adding to this Gmail account.

Check your inbox for this message from Gmail, find the code and enter it, then click Verify.

Once this is verified, you’ll be ready to send from the new email alias! Refresh your inbox, open a compose window, and click the From line to see a list of all the linked accounts.

Note, although you have to do the setup from a desktop version of the Gmail site, the From addresses should be available from any of the Gmail apps and the mobile site. Just make sure to click on the From field to toggle between them.

Step 7—Done!

That’s it, all done. Whew!

Now you can start putting your new email to good use.

  • Create some new business cards (perhaps with moo)
  • Update (or create) your landing page
  • List and sell some products
  • Profit $$$ :)

Problems? No Problem!

If you have any questions or need more detail on any of the steps, let me know in the comments and I’ll help if I can. If you want someone to just take care of this for you, I offer the complete setup as an affordable paid service.

Here are some occasional problems I’ve run into:

Account gets flagged in Mailgun

Sometimes, Mailgun will flag or lock the account. This is done automatically based on various triggers, and is a GOOD thing. It shows they are working to keep bad actors off the platform. If this happens to you, DON’T WORRY. It’s easy to fix (assuming you’re not actually a bad actor).

Just email Mailgun support from the Gmail account you used to sign up, include your account info and ask for reinstatement. Usually, they just want a short statement in writing about your plans for the service — you can say something like “I need to email customers from my site, and expect to send ~50 emails a week.”

Relaying Denied

If you used the subdomain (e.g. mail.yourdomain.com or mg.yourdomain.com) when setting up CloudFlare and Mailgun, instead of the root (yourdomain.com), you’ll likely see an error like this when you attempt to send an email to your new routes:

The solution is to go back through the steps and add the root domain instead of the sub domain. More info here: https://www.gregjs.com/linux/2015/forwarding-mail-to-your-gmail-account-with-mailgun/

G Suite | Google Apps

If you’re using G Suite instead of a plain Gmail account, you have one extra step to take. Note, you’ll need to be the administrator of the G Suite account in order to access this setting.

It can be a bit hard to find, so here’s a direct link to the page: https://admin.google.com/onedurr.com/AdminHome?hl=en#ServiceSettings/service=email&subtab=filters

Scroll down the page until you find the setting highlighted (“Allow per-user outbound gateways”). Make sure the box next to it is checked (reads “Allow users to send mail through an external SMTP server when configuring a “from” address hosted outside your email domains”)

This setting will need to be enabled before you can complete Step 6

Again, if you have any questions or need more detail on any of the steps, let me know in the comments and I’ll help if I can. If you’d rather just have someone else take care of this setup for you, I do offer the complete setup as a paid service.