---
title: "Add a DKIM record to a Shopify domain, plus SPF and DMARC"
date: "2026-11-06"
author: RocketCart
url: "https://getrocketcart.com/docs/sending-domain/shopify-domains/"
type: docs
---

If you bought your domain in Shopify, you edit its DNS in the Shopify admin under **Settings > Domains**. You can add RocketCart’s SPF and DMARC records there. The DKIM record is a problem: Shopify accepts TXT values of up to 255 characters, and RocketCart’s DKIM value is longer.

This page is for domains bought in Shopify. If you bought your domain elsewhere and only connected it to Shopify, its DNS is managed at that company. Use the guide for [your DNS provider](/docs/sending-domain/set-up-sending-domain/#step-2-add-the-three-txt-records-at-your-dns-provider).

## The records RocketCart needs

| Record | Type | Name | Value |
| --- | --- | --- | --- |
| SPF | TXT | `@` | `v=spf1 include:mailgun.org ~all` |
| DKIM | TXT | `<selector>._domainkey` | `v=DKIM1; k=rsa; p=<your public key>` |
| DMARC | TXT | `_dmarc` | `v=DMARC1; p=none` |

- Copy every value from the **DNS records** panel in RocketCart (**Settings > Email Settings**). Click **Copy value** on each tab. `<selector>` and `<your public key>` are unique to your store. If the app shows the literal word `<selector>` in Host/Name, your selector is your store name as RocketCart saved it on install: lowercase letters and numbers, hyphens between words, for example `my-store` for “My Store”.
- Use the names exactly as shown in the Name column.

Warning

Shopify’s DNS only accepts TXT values of up to 255 characters, and you can’t split a longer value into parts. RocketCart’s DKIM value is about 410 characters, because it uses a 2048-bit key. Shopify shows “Value is too long (maximum is 255 characters)” when you try to save it. RocketCart doesn’t offer a shorter key, and it can only turn on your domain when all three records are verified.

## How do I add a TXT record in Shopify?

1. In your Shopify admin, go to **Settings > Domains**.
2. Click the domain you send from.
3. In the **DNS settings** section, click **Manage**.
4. Click **Add custom record** and choose **TXT**.
5. Paste the value from the table above. For the SPF record, leave the name as Shopify fills it in; Shopify’s help says not to edit the name field for a new TXT record. For the DMARC record, the name must be `_dmarc`.
6. Click **Confirm**.
7. Repeat for the DMARC record.

## What can I do about the DKIM record?

Shopify’s own help suggests three ways around the 255-character limit. Only one of them works with RocketCart today:

| Shopify’s suggestion | Works with RocketCart? |
| --- | --- |
| Generate a 1024-bit DKIM key instead | No, RocketCart always creates a 2048-bit key |
| Ask the email service for a value of 255 characters or less | No, the value can’t be shortened |
| Transfer the domain to a provider that supports longer TXT records | Yes |

After a transfer, add the three records at the new provider, for example [Cloudflare](/docs/sending-domain/cloudflare/), [GoDaddy](/docs/sending-domain/godaddy/) or [Namecheap](/docs/sending-domain/namecheap/). Check with Shopify how a transfer affects your store’s domain settings before you start.

## What if I already have an SPF record?

A domain can only have one SPF record. With two, both fail. If you already have a TXT record that starts with `v=spf1`, edit that one instead of adding a new one. Put `include:mailgun.org` **before** the `~all` or `-all` at the end:

|  | Value |
| --- | --- |
| Your record now | `v=spf1 include:_spf.google.com ~all` |
| After your edit | `v=spf1 include:_spf.google.com include:mailgun.org ~all` |

Keep every service your record already lists. Only add `include:mailgun.org`.

Mail servers stop reading an SPF record at `~all` or `-all`, so an include placed after it is ignored. If the value RocketCart suggests ends with `include:mailgun.org`, move that part in front of `~all` when you paste it.

## What if I already have a DMARC record?

Keep it and skip the DMARC record. A domain should have only one DMARC record on `_dmarc`, and RocketCart accepts any valid one.

## Verify the records in RocketCart

1. In RocketCart, go to **Settings > Email Settings**.
2. In the **DNS records** panel, click **Verify DNS**.
3. When all three tabs show **Verified** (**Status: 3/3 DNS records verified.**), turn on **Enable custom domain**.

DNS changes can take up to 24 hours. Without the DKIM record, the DKIM tab stays **Missing** and **Enable custom domain** doesn’t appear. RocketCart only checks when you click **Verify DNS**, so click it again later if a record still shows **Missing**. The full flow is in [Set up a custom sending domain](/docs/sending-domain/set-up-sending-domain/). If a record won’t verify, see [Sending domain not verifying](/docs/troubleshooting/sending-domain-not-verifying/).
