Setting DNS records in Cloudflare

You can create new email addresses in ProtonMail using domains that you own. For example, if you own, you can create a custom domain email address in ProtonMail like

This article describes the steps to set up a custom domain for domains registered through Namecheap. We also provide step-by-step guides for other major registrars: Amazon Web Services, GoDaddy, Namecheap, and Google Domains.

You can also read our Support article about DNS records generally, as well as this guide to anti-spoofing measures (SPF, DKIM, and DMARC). These articles can help you if you bought a domain from a registrar not listed above.

Once your custom domain is set up, you can use it to add custom domain email addresses.

1. Add your custom domain

1) Log into your ProtonMail account at and go to Settings -> Domains.

2) Click on “Add Custom Domain”. This will take you to step 1 of the setup wizard.

3) Type in your domain name and click “Next”.

4) Enter your ProtonMail password (and 2FA code, if enabled) and click “Submit”.

2. Verify that you own the domain

1) Go to and log into your Cloudflare account.

2) Click on the dropdown menu on the top left and click on the domain you would like to use.

3) Select the DNS settings tab and enter the following information:

Record Type: TXT
Host: @ (If the “@” value is not accepted, enter your domain instead.)
Value: (Copy and paste the unique text string under “VALUE / DATA / POINTS TO” in the ProtonMail setup wizard)
TTL: Automatic

4) Click on “Add Record”. (Depending on your registrar, you may have to wait up to 24 to verify before you can move on to the next steps.)

3. Choose your email address

1) Click on “Add Address” and create your new email address in the modal. You can choose the text that appears before, as well as the display name and email signature.

2) Click on “Save”.

4. Set MX records in Cloudflare

1) Click on the dropdown menu on the top left and click on the domain you would like to use.

2) Select the DNS settings tab.

3) For Record Type, select MX from the menu.

4) For Name, enter your custom domain name (e.g.

5) Where it says “Click to configure”, click the space to open the Add Record window. Enter the following information:

Priority: 10

Then click on “Save”.

6) For TTL, leave it as the default: “Automatic TTL”.

7) Click on “Add Record”.

5. Set SPF, DKIM, and DMARC

We recommend also adding SPF and DKIM records. Setting DMARC is an optional, advanced feature. You can learn more about what each of these additional security settings do here.

SPF, DKIM, and DMARC are set the same way as TXT records.

1) Click on the dropdown menu on the top left and click on the domain you would like to use.

2) Select the DNS settings tab and select TXT as the Record Type. Create the SPF record according to the values shown in the ProtonMail wizard.

3) Repeat these steps for DKIM and, if desired, for DMARC.

You should now be able to use your new custom domain email address!

Post Comment


  1. Anonymous

    If I use Protonmail as my only email provider, could I not make this Priority 0 rather than Priority 10? Thanks

  2. ProtonMail Support

    Of course, you can set the priority to 0 if you want, but it won’t make a difference if you only have one MX record set up.

  3. Anonymous

    If i use cloudflare, would it make a difference to the email if i had it routed through cloudflare? I do this now for my domains email. Would it cause issues with proton mail?

  4. ProtonMail Support

    As long as your MX records point to ProtonMail, everything will be fine.

  5. liam holmes


    I followed the verification steps in the DNS record-
    However, I am getting the error-

    DNS Validation Error (Code: 1004) Invalid TXT record. Record may only contain printable ASCII

  6. ProtonMail Support

    Please contact our Support Team:

  7. liam holmes

    Do we need to delete the MX records of the legacy email system?
    (or can we leave both in place)

  8. ProtonMail Support

    As long as ProtonMail’s MX records have the highest priority, there should be no issue with having other MX records as well.

Leave A Comment?