Create a Custom Email Domain When GitHub Pages is Your Web Host

April 15, 2020 · 4 minute read

Email Service

GitHub Pages is an awesome, free way to host a website. This is where my current developer portfolio lives. Although it’s a pretty simple setup, GitHub is lacking a solution to directly configure a custom email domain (for example hi@my.domain rather then Even though an email address may seem like a small detail in the larger branding picture, custom email domain can help enhance your overall brand image and build customer trust.

Below are step-by-step instructions on how to set up a custom email address to send and receive emails, which will route to your Google Gmail account.

Step 1: Sign up for a domain email service

There is a choice of solutions for that, paid and free. On the free side here are a few free services:

Zoho Mail free plan limits you to their webmail only, and Yandex has ads. doesn’t have those limitations. For this instance, I will use

When you’ve signed up you’ll want to click Admin in the bottom left of the sidebar menu, then Create a new email. You’ll be asked to enter the email name (eg. hi@my.domain).

Step 2: Configure your DNS

DNS records tell mail senders which service handles incoming email for the domain. Setting up will mean updating your domains MX and TXT records to point back to the service. You will now want to navigate to your registrar from which you acquired your domain. If you aren’t sure where you registered your domain, you can search for your domain host online at The example I will show you is from the Google Domains, although it’s always the same process for every registrar.

You will need to add an MX record as well as two TXT Records. You can find the correct DNS records you will need to copy from here:

Copy and paste the DNS records that they ask you to create and then click continue. You can use to verify that your records are properly implemented.

DNS Record Configuration

Step 3: Set up email redirect

In the sidebar menu, click Admin and then Create a redirect (alias). Here you will want to redirect your newly generated email to your Gmail email address. Once you’ve added the redirect you’ll be able to receive email via your custom domain. Try sending an email to the new address and you’ll see it get forwarded automatically to your Gmail. email redirect

Step 4: Connect Mail Client (Gmail) to Domain Email

Copy the following POP3 information: You will copy and paste this information in Gmail.

Navigate to Gmail. Open Gmail and click on Settings > Accounts and Import > Check email from other accounts > Add an email account. Enter your domain email address and follow the steps to inject your POP3 information.

Step 5: Send emails from a different address

You should now be able to view your custom domain emails in your Gmail account. But now you want to be able to send email responses with your new email vs your Gmail address. Open Gmail and click on Settings > Accounts and Import > click Add another email address located in the “Send mail as” section Enter your name and the address you want to send from Click Next Step > Send verification. Enter the SMTP server (for example, in our case) and the username and password on your account. Click Add Account. Confirm the address. You will receive an email, and you will need to click on a link to confirm.

Now when sending a message, click the “From” line. (If you don’t see this, click the space next to the recipient’s email). Select the address to send from, and boom, you can now receive and send emails from your custom email domain!

Please let me know if you hit any roadblocks and/or need a hand implementing a custom email domain. You can contact me directly at