DEV Community

Cover image for Email Alias – How to Set Up a Professional Email for Free
Eamonn Cottrell
Eamonn Cottrell

Posted on • Originally published at freecodecamp.org on

Email Alias – How to Set Up a Professional Email for Free

Originally published for freeCodeCamp

I needed to log in to AWS. But my main email address was rejected. I'd done this in the past and the account had been irreversibly deleted.

No reset option just a message saying the account was permanently deleted:

Screen-Shot-2022-10-12-at-2.17.29-PM

There are about a million ways to get a new email address, but I wanted to set up one of the domains I own with email.

And I figured there would probably be a way to have that forwarded to my Gmail.

I was right!

In this quick guide, I'll walk you through:

  • How to create an email alias

  • Forwarding mail from the alias to a Gmail account

  • Sending mail as the Email Alias

How to Create an Email Alias

I'm using Google products: Google Domains and Gmail. All these steps should apply generally to other Domain and Email services.

First, login to your domain provider and select the Email menu. You will be able to select " Add email alias" from the menu options.

Screen-Shot-2022-10-12-at-2.37.40-PM

How to Forward Email to Another Address

Note: if you add the asterisk (*) symbol, this will create a wildcard alias that forwards any email to the specified address. We'll be adding a specific alias in this tutorial.

Add whatever email you choose and enter where you'd like it to be forwarded to. I'll have hi@sieis.com forwarded to my main Gmail address.

Screen-Shot-2022-10-12-at-2.41.16-PM

If you are using Google Name servers, then Google Domains will automatically set up the correct mail records (MX).

Otherwise, you'll need to set up these MX records. The process is exactly like setting up name servers if you've ever done that to host your website somewhere different than where you purchased the domain.

| NAME/HOST/ALIAS | TYPE | TIME-TO-LIVE (TTL) | PRIORITY | VALUE/ANSWER/DESTINATION |
| Blank or @ | MX | 1H | 5 | gmr-smtp-in.l.google.com |
| Blank or @ | MX | 1H | 10 | alt1.gmr-smtp-in.l.google.com |
| Blank or @ | MX | 1H | 20 | alt2.gmr-smtp-in.l.google.com |
| Blank or @ | MX | 1H | 30 | alt3.gmr-smtp-in.l.google.com |
| Blank or @ | MX | 1H | 40 | alt4.gmr-smtp-in.l.google.com |

Bonus: I've done this for a site hosted on Netlify, and it is very straightforward. From the Netlify dashboard, select Options , Go to DNS panel , and then enter the MX records:

Screen-Shot-2022-10-12-at-3.42.25-PM

👇

Screen-Shot-2022-10-12-at-3.42.53-PM-2

Google will send a one-time verification email here, but if you've previously done this verification it may not send another one.

Send yourself an email from a different address and check it out!

Screen-Shot-2022-10-12-at-3.02.53-PM-1

Email sent to Alias and forwarded to main Gmail

Note: sending from your main Gmail address doesn't show up as an unread message like it normally would when you email yourself. Send it from a different address at this point. After the rest of the steps, it will behave as normal when we complete the "send email as alias" part.

Screen-Shot-2022-10-12-at-3.04.35-PM

How to Send Email as the Alias

If you reply from your main Gmail currently, the recipient will see that address when you reply instead of the alias. That may not be a big deal depending on the use case, but we can certainly set it up so that sent mail acts like it's coming from the custom domain as well.

Screen-Shot-2022-10-12-at-3.08.37-PM

You'll need to go to your Google Account Security and click App passwords.

Screen-Shot-2022-10-12-at-3.12.46-PM

Select Mail for the app dropdown and Other for the device dropdown.

Screen-Shot-2022-10-12-at-3.14.18-PM

Enter the name of your domain and click Generate. It will give you a 16 digit password. Save this for use over in Gmail...

Screen-Shot-2022-10-12-at-3.15.34-PM

In Gmail, go to settings -> Accounts and Import and click Add another email address.

Screen-Shot-2022-10-12-at-3.17.49-PM

This will pop up a new small window where you will enter in the details of the alias. Enter the name you want recipients to view and the address of the alias. Make sure the " Treat as an alias" box is checked.

Screen-Shot-2022-10-12-at-3.21.46-PM

On the next screen, you'll need to change the SMTP server to smtp.gmail.com, the username to your Gmail username, and then paste in the 16-digit password you generated from Google Security in the steps above.

The port should be 587, and the TLS radial button should be checked.

Click Add Account.

Screen-Shot-2022-10-12-at-3.23.33-PM

This will prompt a verification code being sent to the email alias...which should in turn go to the Gmail account. Enter that in, and you'll now be good to go!

Screen-Shot-2022-10-12-at-3.27.09-PM-1

Back in our email thread in Gmail, you'll have the dropdown option when composing new messages to select which account you would like it to send from.

Screen-Shot-2022-10-12-at-3.29.10-PM

Now we can see from our full thread that our email forwards to and sends from our Gmail account using the email alias and display name we selected.

Screen-Shot-2022-10-12-at-3.35.15-PM

Thanks for reading!

This was enlightening for me, and I hope it's helpful for you too.

Come say hey on Twitter: https://twitter.com/EamonnCottrell

goodtogo

Top comments (0)