The very first thing you will need to do is to add your domain. And the very first thing that Mailgun will have advised when you set it up was that it was probably best to use a subdomain of your main domain, this was very good advice and for this article assume the subdomain is “website”
You need to pop over to Google Domains and click the “Manage My Domains” button and then choose the relevant domain and click click on the DNS menu button to the right you need to scroll down to the Custom resource records.
Now what you need to do is to add the records required by Mailgun to verify and authorise your domain, these are:
- TXT (another one)
- MX (another one)
- CNAME (for message tracking)
TXT records (known as SPF and DKIM) are required to send and receive mail with Mailgun, they are detailed in the Domain Verifications & DNS sections of Mailgun. You add in values by using the simple GUI at the top the columns are Name, Type, TTL (Time to live) and Data. So an example set of information looks like this:
Obviously, the data here is not real. Pay attention to the MX record, there is a little black + next to the record after entering the first one to allow multiple records under the same key. Just click that to add the second record. In each case after filling out the information click the Add button and you should end up with a similar screen as above.
After this is complete just wait for your domain to verify, this doesn’t take very long.