Setting up an alias email address with only a custom domain
October 10, 2022
When I set up this site, I wanted it be accompanied by an @kwanlin.com
email address. BUT I didn’t want to have to buy into another email provider or Google Workspace.
Frankly, while I liked the idea of a customized email address, I wasn’t really expecting to use this email all that regularly. It just didn’t make sense to me to fork over a monthly fee for something I knew right off the bat that I wasn’t going to get all that much use out of.
Fortunately, there are a few ways to configure a Gmail account and Google Domains (through which this domain is registered) such that emails could be sent and received from an @kwanlin.com
address.
Google Domains #
The first thing to do is register a domain. I use Google Domains, and the instructions here cater primarily to Google Domains, but the same concepts should apply if you’re using some other domain registration service.
Once the domain is registered, go to your Google Domains dashboard, select the domain you’d like to configure, and select Email
from the sidebar. This will allow you to set up email forwarding.
Then, select Add email alias
, which will allow you to set up a <name>@<domain>
alias. Any email sent here will be redirected to wherever you specify. In my case, I used a Gmail account I had already set up.
Once that’s done, we’re all set on the Google Domains side of things.
You can test this out by sending an email to the email alias that was just configured. If everything’s working correctly, the email should be redirected to your specified email destination.
As a sidebar, this does create a new MX
DNS record for your domain within Google Domains. It’s a nice convenience to not have to figure this part out yourself. This is one of the reasons why I opted to allow Google Domains to handle my DNS configuration rather than Netlify, the other service that actually handles my site deployment.
Gmail #
Next, we’ll want to configure the Gmail account so that emails sent from there appear to originate from the alias you specify.
Log into your Gmail account, then head to See All Settings
, and then Accounts and Import
. From there, go to Send mail as
, and then select Add another email address
. That’ll bring up a popup where you’ll get to specify alias. Input the alias you would like to use.
On the next screen, you’ll be prompted to input details for the outbound email server. Set the SMTP Server to smtp.gmail.com
and the port to 587
. Speciy the true email address in the Username
field, not the alias.
Now here’s where things get a bit tricky. The Password
field is not for the actual Gmail account’s password; it’s for an App Password
.
To get the App password, go back to your main Gmail window, click on your account icon, and select Manage Your Google Account
. From there, scroll down to Security
. Under Signing in to Google
, you should see an App passwords
option. If this isn’t present, you may first have to set up 2-step verification.
Then, navigate into App passwords
, and select Mail
under Select app
. For Select device
, specify other
. When prompted for the app and device
you would like to generate the app password for, input the full alias email you would like to configure.
Then, hit Generate
, and this should present a password. This is what you want to input in the Add another email address you own
password field. You may be presented with a 404 error. If that happens, just navigate your way back to the Add another email address you own
and repeat all the inputs, but faster this time (this might just be due to a timeout).
You’ll be asked to enter a verification code that was sent to your aliased email. Just grab that, paste it into the window, and your aliased email should now be all set up.
At this point, head back to your Gmail settings, and under Send mail as
, set the new email alias as the default, and under When replying to a message
, select Always reply from default address
.
Resources #
Here’s a great video that walks through the Gmail alias setup process: