How to forward emails to my custom domain to my Gmail account?
I built a free, open-source, encrypted, and private solution at https://github.com/niftylettuce/forward-email. This service does not store logs, it is completely private and simply acts as a proxy. No email is ever stored on the server, it's all proxied in memory to the recipient's mail server (view the source on GitHub if you'd like to learn more about how it works!).
The documentation is hosted at http://forwardemail.net/ and you can configure it with the instructions below.
Replace
[email protected]
with the email address you want to forward emails to below:
- Set the following DNS MX records on your domain name:
Name/Host/Alias TTL Record Type Priority Value/Answer/Destination @ or leave blank 3600 MX 10 mx1.forwardemail.net @ or leave blank 3600 MX 20 mx2.forwardemail.net
- Set (and customize) the following DNS TXT records on your domain name:
If you are forwarding all emails from your domain to a specific address:
Name/Host/Alias TTL Record Type Value/Answer/Destination @ or leave blank 3600 TXT [email protected]
If you just need to forward a single email address (e.g.
[email protected]
to [email protected]; this will also forward[email protected]
to[email protected]
automatically):
Name/Host/Alias TTL Record Type Value/Answer/Destination @ or leave blank 3600 TXT forward-email=hello:[email protected]
If you are forwarding multiple emails, then you'll want to separate them with a comma:
Name/Host/Alias TTL Record Type Value/Answer/Destination @ or leave blank 3600 TXT forward-email=hello:[email protected],support:[email protected]
Please note that if you have multiple TXT record lines for
forward-email:
the service will only read the FIRST listed - please ensure you only have one line.
- Set (and customize) the following TXT record for SPF verification for your domain name (this will allow SPF verification to pass):
If you're using a service like AWS Route 53, then edit your existing TXT record and add the following as a new line:
Name/Host/Alias TTL Record Type Value/Answer/Destination @ or leave blank 3600 TXT v=spf1 a mx include:spf.forwardemail.net ~all
If you already have a similar line with
v=spf1
, then you'll need to appendinclude:spf.forwardemail.net
right before any existinginclude:host.com
records and before the~all
in the same line (e.g.v=spf1 a mx include:spf.forwardemail.net include:host.com ~all
).
Send a test email to confirm it works. Note that it might take some time for your DNS records to propagate.
If you have any issues please visit http://forwardemail.net/ and/or file an issue on GitHub at https://github.com/niftylettuce/forward-email.
You will need to add an MX record to your domains DNS. If you're using your Registrar to do the email forwarding, you'll add their e-mail servers for the MX records. Without an MX record, mail servers have no idea which servers to send the mail to.
Simple solution: Use http://improvmx.com/ and then set your MX records and you are done.