Email domain setup

In order to set up a custom email domain for inbound and outbound email, you will need to own the domain, and have access to modify its DNS records.

This article is a little bit technical, but assumes no previous knowledge about DNS.

A DNS record is a special entry associated with your domain that is publicly visible and cannot be set by anybody except the domain owner. There are various types of DNS records, and they are used to instruct other services how to behave when coming across your domain. For example, one of the most common DNS records is used to specify which IP address your domain points to. When a user then types your domain in a browser, the browser will look up the record on your domain and route its request to the appropriate IP.

For the purpose of email, there are 3 DNS entries that we need to set:

  • An SPF record specifies which providers are allowed to send outbound mail on behalf of your domain. When a mail server (e.g. gmail) receives an email, it will check the sender's domain to make sure the server that sent the email is in the SPF list. Otherwise it will mark the email as spam. The SPF record prevents unauthorized servers from sending mail on your behalf.
  • A DKIM record contains half of a special password (called a public key) that can be used to verify the authenticity of the sender. If we didn't do this, then anybody could write an email pretending it was from you. When you set a DKIM record, the other half of the special password (called a private key) must be used to sign any outbound emails. This private key is kept secret by your mail provider, so they are the only ones that can compose emails on your behalf. When a mail server receives an email that is not signed correctly, it will mark the email as spam.
  • An MX record is used to tell other mail providers where to send email. It is used when you want a mail provider to receive email on your behalf.

Now that we know what DNS records need to be set, we need to know how to set them. Each domain registrar has a slightly different interface to do this. We've compiled a list below, as well as generic instructions for all registrars in case we don't have yours listed.

TODO: add registrar-specific instructions

Feedback or clarification