Sub topic 8
Unsubscribe links, headers, and preference centers
This chapter assumes you know how email is sent and received, what an email service provider (ESP) does, and what a DNS record is. It also assumes you have read the earlier chapters on the three email types and on legal basics. Here you will see how to let people leave your marketing mail, and how to make that exit visible to both people and mailbox providers.
Why unsubscribe handling matters
An unsubscribe path does three jobs. It meets legal duties, such as the opt-out rules in CAN-SPAM and the right to withdraw consent under GDPR. It gives unhappy readers a clean way out. It also protects your sender reputation. If the exit is hard to find, readers click "Report spam" instead, and complaints hurt deliverability far more than an unsubscribe does.
Which messages need an unsubscribe path depends on the type:
| Email type | Unsubscribe link | List-Unsubscribe header |
|---|---|---|
| Newsletter | Required | Recommended |
| Promotional | Required | Recommended |
| Transactional | Not required, since the message is a response to one user action | Not used |
The visible unsubscribe link
Put a plain link in the footer of every newsletter and promotion. Follow these rules:
- Label it clearly, for example "Unsubscribe". Do not hide it in tiny, low-contrast text.
- Make it work in one step or with one confirmation click. Do not require a login, a password, or a reason.
- Honor the request quickly. CAN-SPAM allows up to 10 business days, but processing it immediately is better practice.
- Keep the link working for a reasonable time after the message is sent (CAN-SPAM requires at least 30 days).
- Use a token unique to the recipient, such as
abc123in the sample below, so the link needs no login and cannot be guessed to unsubscribe other people.
The List-Unsubscribe headers
Mail clients such as Gmail and Apple Mail can show their own "Unsubscribe" button next to the sender name. They build it from message headers. List-Unsubscribe gives the destination (an HTTPS URL, a mailto: address, or both). List-Unsubscribe-Post, defined in RFC 8058, enables one-click unsubscribe. With it, the client sends a POST request to your URL without opening a page.
From: Example Weekly <[email protected]>
To: [email protected]
Subject: This week at Example: three guides worth your time
List-Unsubscribe: <https://example.com/unsubscribe/abc123>, <mailto:[email protected]?subject=unsubscribe>
List-Unsubscribe-Post: List-Unsubscribe=One-ClickFor one-click to work, the HTTPS URL must accept a POST and unsubscribe the recipient immediately. The message should also carry a valid DKIM signature that covers the List-Unsubscribe and List-Unsubscribe-Post headers. Large providers expect bulk senders to support one-click unsubscribe, so check their current sender guidelines.
Preference centers
A preference center is a page where a recipient chooses what they want instead of leaving entirely. It might offer separate topics (weekly guide, product news, offers), a frequency choice (weekly or monthly digest), and a pause option.
Keep the full "Unsubscribe from all marketing" choice easy to reach. A preference center that makes people click through many options before they can leave works against the law and against your reputation. A good pattern is to let the unsubscribe link or one-click action opt the person out immediately, then offer a "change preferences instead" link on the confirmation page.
Common errors
- Unsubscribing only one list. If a person opts out of "all marketing" but is still in a second promotional list, they will get more mail and complain.
- Treating opt-out as deletion. Keep the address on a suppression list. If you delete it, a later import can add it back.
- Blocking transactional mail by mistake. An unsubscribe from marketing should not stop password resets or receipts. Store marketing consent and transactional delivery separately.
- Broken or slow endpoints. If the one-click URL returns an error, the client may fall back to marking the message as spam.
- Adding a header to transactional mail. An unsubscribe button on a receipt invites people to turn off messages they need.
Exercise
A reader clicks the "Unsubscribe" button that Gmail shows beside your newsletter's sender name. Which two headers made that button possible, and what must your HTTPS endpoint do when it receives the request?
Show answer
The List-Unsubscribe header supplies the URL (and optionally a mailto address), and List-Unsubscribe-Post: List-Unsubscribe=One-Click (RFC 8058) tells the client it may send a POST. The endpoint must accept the POST and unsubscribe the recipient right away, without a login or further page interaction, and add the address to the marketing suppression list.
Exercise
A customer unsubscribes from your promotions. Two days later they request a password reset. Should the reset email be sent, and why?
Show answer
Yes. The reset is a transactional message triggered by the customer's own action, and the marketing opt-out covers only newsletters and promotions. Marketing consent and transactional delivery should be tracked separately.