Mailchimp merge tags: fallbacks, custom HTML and DKIM setup

Mailchimp's *|FNAME|* prints a blank when a contact has no first name. How to add a default or an *|IF:|* fallback, code custom HTML and set up DKIM.

600 or 640

Pixels wide Mailchimp recommends for the layout of a custom-coded email
On this page
  1. How Mailchimp merge tags work
  2. How to set a default for an empty first name
  3. Conditional merge tags as a fallback: IF and ELSE
  4. Why are my Mailchimp merge tags not working?
  5. Can you use merge tags in the subject line?
  6. Do merge tags work in link URLs?
  7. The Mailchimp merge tags list
  8. How to use a custom HTML template in Mailchimp
  9. How to set up Mailchimp DKIM and DMARC
  10. Sources

In Mailchimp the first-name merge tag is *|FNAME|*, and a contact with no first name gets a blank space where the name was supposed to appear. The tag has no fallback of its own. Give it one with a default merge tag value on the First Name field, or with a conditional merge tag that prints another word when the field is empty.

What Mailchimp has for the contactThe tag aloneHello *|FNAME|*,The tag, with a field defaultHello *|FNAME|*,Default merge tag value: thereA conditional blockHello *|IF:FNAME|* *|FNAME|*, *|ELSE:|* there, *|END:IF|*
First name is AdaHello Ada,Hello Ada,Hello Ada,
First name is emptyHello ,a blank spaceHello there,Hello there,
Used in the subject lineWorks, and an empty name leaves the same blank.Not documented. The page on defaults does not mention subject lines.Does not work in subject lines.
Used inside a link's URLWorks, for a unique URL per contact.Not documented.Breaks the URL when the email is sent.
Example. One greeting written three ways, and what each contact receives. From Mailchimp's pages on merge tags, default merge values, conditional merge tags and unique URLs, read 31 October 2026. Neither the tag nor a conditional fills in on a test email.

How Mailchimp merge tags work

A merge tag is a field's tag between asterisks and pipes, and Mailchimp replaces it with the content of that audience field for each contact. New audiences start with *|FNAME|*, *|LNAME|*, *|ADDRESS|* and *|PHONE|*, but Mailchimp's developer guide says these default fields are editable. Check the real tags under the audience's More options menu, in Audience fields and merge tags. An audience holds at most 30 fields per contact, and a field's type cannot be changed once it is added.

How to set a default for an empty first name

In Audience fields and merge tags, choose Edit from the field's menu, fill in Default merge tag value and save (Mailchimp). Every field takes one except the required Email Address field and the physical Address field. The default appears only in sent email, not in the audience. It is one word for everyone, which suits "Hello there," and little else.

Conditional merge tags as a fallback: IF and ELSE

This is Mailchimp's example for content when data is missing:

Hello *|IF:FNAME|*
*|FNAME|*,
*|ELSE:|*
Friend,
*|END:IF|*

*|IF:|* shows its content when the field has a value and *|ELSE:|* shows the alternative. *|ELSEIF:|* tests a second condition and *|IFNOT:|* reverses the test. What breaks them, from the same page:

  • A block that does not close with *|END:IF|* in the same content block it opened in.
  • A typo, the wrong case, or an extra or missing space.
  • A subject line or a unique URL, where they do not work.
  • Contact tags, which they cannot test, and AND or OR conditions, which Mailchimp says not to use.

For a name typed in lower case, *|TITLE:FNAME|* capitalizes the first letter of each word, according to the merge tag cheat sheet.

Why are my Mailchimp merge tags not working?

Usually one of six things:

Can you use merge tags in the subject line?

Yes. Mailchimp's subject line advice is to use merge tags for each recipient's name or location. Conditional tags do not work there, and the page on default values does not mention subject lines, so unless every contact has a first name, keep the name in the body.

In a custom-coded email, *|MC_PREVIEW_TEXT|* generates the preview text from what you save in the Preview Text field. The pages we read do not say whether merge tags work inside that field.

A merge tag can go in a link's URL to give each contact a unique link. A conditional tag there breaks the link when the campaign goes out, and a forwarded email keeps the original contact's URL. The cheat sheet adds *|URL:YOUR_MERGETAG|*, which encodes a value for a URL, and *|HTML:YOUR_MERGETAG|*, which inserts the value unchanged when it already holds URL parameters.

The Mailchimp merge tags list

The tags a custom template uses most, from Mailchimp's list of all merge tags:

TagWhat it inserts
*|FNAME|*, *|LNAME|*First and last name, if the audience has them
*|EMAIL|*The contact's email address
*|UNSUB|*The unsubscribe link, required in every email
*|UPDATE_PROFILE|*A link to the contact's preferences page
*|ARCHIVE|*A view in browser link to the campaign page
*|LIST:DESCRIPTION|*The audience's permission reminder
*|LIST:ADDRESS|*Your postal address as plain text
*|MC:SUBJECT|*The subject line
*|MC_PREVIEW_TEXT|*Preview text, in a custom-coded email
*|DATE:X|*The current date, in the format you put in place of X

How to use a custom HTML template in Mailchimp

Custom HTML needs a Standard plan or higher, and custom-coded templates are only available in the legacy builder. Bring the HTML in with Paste in code, Import HTML or Import ZIP. A ZIP must be under 1MB, with one HTML file and its images at the root. Mailchimp checks imported HTML with a validator, and expects images on a public server and absolute links.

The Automatic CSS Inliner, a box on the Settings tab, converts embedded CSS to inline styles after the email enters the send queue. Your code does not change on screen, so check the side-by-side preview before you send.

How to make regions editable with mc:edit

Mailchimp's template language makes parts of your HTML editable in the builder:

<td class="defaultText" mc:edit="body">...</td>
<img src="..." mc:edit="left_image" />
<div mc:repeatable="product" mc:variant="content with left image">...</div>
<div mc:edit="content" mc:hideable>...</div>

The rules from that reference:

  • Each mc:edit name must be unique, and goes on a container such as a div or table cell, or on an image.
  • Do not nest editable elements, or put an editable image inside an editable container.
  • mc:variant only works with mc:repeatable, and variant blocks must be adjacent, not nested.
  • Do not put mc:hideable on an element that already has mc:repeatable.

Each mc:edit name also becomes the field that stores the content, so keep names the same across templates, or the copy can be lost when you switch.

Every email needs *|UNSUB|*, and it only works as a link. Without it, Mailchimp adds an extra footer of its own. This is Mailchimp's example for custom HTML:

<a href="*|UNSUB|*">Unsubscribe from this list.</a>

The template language guide also asks for the CAN-SPAM information in the footer, naming *|UNSUB|*, *|LIST:DESCRIPTION|* and *|LIST:ADDRESS|*, and warns that a campaign without it could be rejected.

How wide should a Mailchimp email be?

For custom code, Mailchimp recommends layouts 600 or 640 pixels wide. Its own templates are 600 pixels wide in the legacy builder and 660 in the new one, and it suggests images of 600 to 1200 pixels for the legacy builder, at no more than 1MB each. It gives no separate size for a header, so a full-width header image follows the same widths. Keep the file small as well, because Gmail clips long messages.

How to set up Mailchimp DKIM and DMARC

Mailchimp calls it email domain authentication. First verify the domain with the code Mailchimp emails to an address there. Then open Account & billing from your profile icon, go to the Domains tab and click Start authentication (Mailchimp, as of October 2026). Entri can write the records for you, or you add them by hand: two CNAME records for DKIM and one TXT record for DMARC.

What you publish

ForTypeHostValue
DKIMCNAMEk2._domainkey.example.comdkim2.mcsv.net
DKIMCNAMEk3._domainkey.example.comdkim3.mcsv.net
DMARCTXT_dmarc.example.comThe one shown on your Domains page
SPFNoneNot asked for

What a receiver does with them

  1. The signature names your domain and a selector

    DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=k2; ...
  2. The receiver looks the selector up under your domain

    k2._domainkey.example.com CNAME dkim2.mcsv.net
  3. and reads the key Mailchimp publishes there, a 2048-bit RSA key

    dkim2.mcsv.net TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
  4. d= matches the From domain, so DKIM aligns and DMARC can pass

    From: Ada <ada@example.com>

Underlined in orange: the selector

Example. The records Mailchimp's domain authentication asks for, for a sending domain of example.com: two CNAMEs for DKIM and one TXT for DMARC. Mailchimp shows the exact values only in your account; these hosts, targets and the key size were read from public DNS on 31 October 2026, where Mailchimp's own domain publishes the same pair.

The records can take up to 48 hours to register. Addresses at public mailbox services such as Gmail and Yahoo cannot be authenticated, and Gmail and Yahoo require authentication and a published DMARC record from anyone sending them more than 5,000 emails in 24 hours. An unauthenticated From address is also why some inboxes show "via mcsv.net" or a similar Mailchimp domain beside your name.

Which DKIM selectors does Mailchimp use?

Mailchimp shows the two CNAMEs only inside your account, and its help uses k2._domainkey as an example. In public DNS on 31 October 2026, Mailchimp's own domain points k2._domainkey to dkim2.mcsv.net and k3._domainkey to dkim3.mcsv.net, both 2048-bit RSA keys, and the other Mailchimp senders we checked publish the same pair. So expect the selectors k2 and k3, but copy the values from your own instructions. You never paste a key: Mailchimp publishes it at the CNAME's target.

If your DNS host appends the domain, k2._domainkey.example.com turns into k2._domainkey.example.com.example.com, and Mailchimp's fix is to enter only k2._domainkey. Some domains, Mailchimp's included, also keep an older k1._domainkey with a 1024-bit key that the instructions do not ask for.

Does Mailchimp need an SPF record?

Its instructions do not ask for one. A third-party explainer from Palisade notes that Mailchimp may use a separate envelope domain for SPF, so the DMARC pass comes from DKIM. With the key under your domain, the signature can carry your domain in d= and align with your From address. Mailchimp's pages do not discuss alignment, so confirm it on a received message. An old Mailchimp include in your SPF record is not part of these instructions, and it spends lookups from your budget of 10.

What DMARC record does Mailchimp ask for?

The TXT record goes at _dmarc, with a value your instructions show and the help pages do not. If the domain already has a DMARC record, do not add a second, because a receiver that finds more than one discards them all. Start at p=none with a rua address, as the SPF, DKIM and DMARC explainer describes.

How to check it once it is live

Query the records from a public resolver:

dig +short CNAME k2._domainkey.example.com @1.1.1.1
dig +short CNAME k3._domainkey.example.com @1.1.1.1
dig +short TXT _dmarc.example.com @1.1.1.1

Then send yourself an email from Mailchimp and look in its Authentication-Results header for dkim=pass with your own domain and dmarc=pass, or paste the headers into the header analyzer. For a branded address, the campaign page behind *|ARCHIVE|* lives on mailchi.mp, and a paid account can move it to a verified domain. We found no Mailchimp page offering a branded click-tracking domain for marketing email.

The free mail-merge preview flags every empty merge field in a list exported from your audience, and the DKIM checker takes k2 as the selector. The editor exports Mailchimp HTML with *|FNAME|*, *|IF:|* fallbacks and *|UNSUB|* written in. Draftship also builds and runs outbound inside a client's own platform.

Sources

  • mailchimp.coma blank space where the name was supposed to appear
  • mailchimp.comdefault merge tag value
  • mailchimp.comGive it one with a default merge tag value on the First Name field, or with a conditional merge tag that prints another word when the field is empty
  • mailchimp.comthese default fields are editable
  • mailchimp.comat most 30 fields per contact
  • mailchimp.commerge tag cheat sheet
  • mailchimp.comdo not populate in a test send
  • mailchimp.comstep through real recipients
  • mailchimp.comuse merge tags for each recipient's name or location
  • mailchimp.comin a link's URL
  • mailchimp.comStandard plan or higher
  • mailchimp.comare only available in the legacy builder
  • mailchimp.comconverts embedded CSS to inline styles
  • templates.mailchimp.comMailchimp's template language makes parts of your HTML editable in the builder
  • mailchimp.combecomes the field that stores the content
  • mailchimp.comit only works as a link
  • mailchimp.com600 pixels wide in the legacy builder and 660 in the new one
  • mailchimp.comFirst verify the domain with the code Mailchimp emails to an address there
  • mailchimp.comThen open Account & billing from your profile icon, go to the Domains tab and click Start authentication (Mailchimp, as of October 2026)
  • mailchimp.commore than 5,000 emails in 24 hours
  • mailchimp.com"via mcsv.net" or a similar Mailchimp domain
  • dns.googleIn public DNS on 31 October 2026, Mailchimp's own domain points k2._domainkey to dkim2.mcsv.net
  • dns.googleIn public DNS on 31 October 2026, Mailchimp's own domain points k2._domainkey to dkim2.mcsv.net and k3._domainkey to dkim3.mcsv.net, both 2048-bit RSA keys, and the other Mailchimp senders we checked publish the same pair
  • palisade.emailmay use a separate envelope domain for SPF
  • rfc-editor.orgmore than one discards them all
  • mailchimp.commove it to a verified domain

Who do you want to hear back from?

Tell us who you sell to and what you have tried. We'll get back to you ASAP, and if it looks like a fit, we build it into your systems within days.

Or write to hello@draftship.io