Unsubscribe and suppression
The List-Unsubscribe header explained, with examples
By mailers.io team Published 5 min read
public/media/blog-list-unsubscribe-header-explained-cover.webp The List-Unsubscribe header is a few lines in the part of an e-mail that nobody reads, and it can decide whether Gmail shows an Unsubscribe button next to your name. This post takes it apart: what each piece means, what a good header looks like and what mailers.io puts there for you.
If you only need the rule and the reason, read one-click unsubscribe first. This is the detail behind it.
The two headers
A message that meets the current rules has two headers:
List-Unsubscribe: <https://example.com/u/a1b2c3>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
The address above is an example. In a real message it is unique to the person and the message.
List-Unsubscribe
This header comes from RFC 2369, a standard for mailing-list headers. Its value is one or more addresses, each inside angle brackets, separated by commas. Two kinds are allowed:
- An HTTPS address. The mail app can open it, or, with the second header, call it directly.
- A
mailto:address. The mail app sends a message to that address and your system treats it as an unsubscribe.
An example with both:
List-Unsubscribe: <mailto:[email protected]?subject=unsubscribe>, <https://example.com/u/a1b2c3>
The mailto form is older. It needs a mailbox that reads incoming mail and an agent that processes it. The HTTPS form is simpler to run, and it is what one-click needs.
List-Unsubscribe-Post
This header comes from RFC 8058. Its single allowed value is List-Unsubscribe=One-Click. It tells the mail app that it may send an HTTPS POST to the address with the body List-Unsubscribe=One-Click and expect the unsubscribe to happen at once, without anything else. Without this header, a mail app that finds an HTTPS address will open it in a browser, and the person has to take more steps.
What the receiving server must do
When a mail app uses one-click, your side gets a plain POST. The standard asks for three things:
- No login and no cookie. The address must be enough on its own. That is why the address contains a token that identifies the contact and the message.
- No redirect that needs a person. The response should be a simple success. Anything else, such as a form, may leave the person still subscribed.
- No reliance on GET. Link scanners fetch addresses in mail with GET requests. If a GET unsubscribed people, scanners would unsubscribe your whole list. The one-click action must only happen on POST.
DKIM must cover the headers
RFC 8058 requires that the two headers be covered by the message’s DKIM signature, so that nobody can alter them in transit. That depends on the signing step at your sending service. In practice, your sending domain needs DKIM set up and aligned with your From address. See sending domains. Without it, Gmail and Yahoo may ignore the headers.
Each header exactly once
A message must hold one List-Unsubscribe header and one List-Unsubscribe-Post header. Doubled headers, which can happen when a template and the sending tool both add one, confuse receivers. Some ignore the message’s headers when they find more than one.
What mailers.io writes
For messages from three sources, campaigns, automations and sequences, mailers.io adds the headers when it prepares each message:
- The address is HTTPS and personal to the contact and the message. It identifies who to unsubscribe without any login.
List-Unsubscribe-Postis set toList-Unsubscribe=One-Click.- Any
List-UnsubscribeorList-Unsubscribe-Postheader already in the draft is removed first, so that the final header is always ours and always works.
The scope depends on the source:
| Source | One-click removes the contact from |
|---|---|
| Campaign | the list the message was sent to |
| Automation | the list of that contact for the automation |
| Sequence | every list of that address (a sequence is outreach to one person) |
When a contact is unsubscribed this way, the status changes, an unsubscribe event is added to the message, and later sends skip them. Skipped recipients are not charged. The detail of the list behind this is in how the suppression list works.
Messages sent through the transactional API or the SMTP relay do not get the headers from mailers.io. They are not marketing mail. If you send newsletters that way, add the header yourself, with an address under your control, or move the mail to a campaign.
Note that mailers.io writes these headers on top of the sending provider. A provider can also add its own headers or handle unsubscribes in its own way. When a provider such as Brevo or Postmark reports an unsubscribe, mailers.io applies it to the same contact in the same way, so the two do not disagree.
Reading the header in a message
To check a message:
- In Gmail, open the message and choose “Show original”.
- Find the two headers near the top, among lines such as
ReceivedandDKIM-Signature. - Check that each appears once and that the first has an HTTPS address.
- Check the DKIM result and that the signature’s
h=tag lists the headers.
You can also send to a few test mailboxes and press the Unsubscribe button on one of them, then see that the contact in mailers.io changes status and that a following campaign skips it.
Common mistakes
- A static address for everyone. A single shared address cannot tell who is leaving. Each message needs its own token.
- Unsubscribe on GET. See above. Link scanners will trigger it.
- An address behind a login or CAPTCHA. One-click cannot satisfy either.
- The header without the visible link. Receivers also look for a link in the body, and people like to see it. Keep both.
- Adding headers for transactional mail. A receipt with an Unsubscribe button invites people to press it.
- Forgetting to process requests. If the request works but your system does not apply it, the next message goes out again. Complaints follow.
Why it matters beyond the rule
An Unsubscribe button in the mail app is the easy path for a person who has lost interest. Every person who takes it is one person who does not press “report spam”. Complaint rates are one of the signals providers weigh most, as you will see in signs that a domain is slipping. A correct header is a small piece of work that protects your sending for a long time.
Questions and answers
Can the header have both a mailto and an HTTPS address?
Yes, separated by a comma. For one-click, the HTTPS address is the one that matters. mailers.io uses an HTTPS address.
Does the address need a login?
No. A one-click request is sent by the mail app, with no cookies and no person. The address must work on its own.
Can I add my own List-Unsubscribe header in a template?
On marketing mail mailers.io replaces it, so that the address always points at a working unsubscribe.
Written by the mailers.io team. Published .