How-to
One-click unsubscribe: setting up List-Unsubscribe headers for Gmail and Yahoo
How one-click unsubscribe works: the two List-Unsubscribe headers, the DKIM and POST rules behind them, and how to test your setup for Gmail and Yahoo.
Key takeaways
- One-click unsubscribe needs two headers: List-Unsubscribe with one HTTPS address and List-Unsubscribe-Post set to List-Unsubscribe=One-Click.
- Your DKIM signature must cover both headers, or mailbox providers are told not to offer the one-click option.
- The HTTPS address must remove the person when it receives a POST, with no login, confirmation page or redirect.
- Gmail and Yahoo ask you to honor unsubscribes within two days, and Gmail's FAQ says a mailto link alone does not meet its requirement.
On this page
One-click unsubscribe lets a recipient leave your list from a button their mail app shows, without visiting your site. You set it up by adding two headers to every marketing message: List-Unsubscribe, holding an HTTPS address, and List-Unsubscribe-Post, holding the value List-Unsubscribe=One-Click. The address must remove the person as soon as it receives a POST request, and your DKIM signature must cover both headers.
As of November 2026, Gmail’s sender guidelines (opens in a new tab) require it for marketing and subscribed messages from anyone sending more than 5,000 messages a day to personal Gmail accounts, and Yahoo’s sender best practices (opens in a new tab) ask for it too. Both also still expect a visible unsubscribe link in the email body.
What does one-click unsubscribe require?
The standard behind it is RFC 8058, published by the IETF in 2017 (opens in a new tab). It asks this of the sender:
| Part | What it must do |
|---|---|
List-Unsubscribe header |
Contain exactly one HTTPS address. A mailto: address may sit alongside it. |
List-Unsubscribe-Post header |
Contain only List-Unsubscribe=One-Click. |
| DKIM signature | Be valid and list both headers in its h= tag. |
| The HTTPS address | Carry enough information to identify the subscriber and the list, ideally as a hard-to-guess token you can check. |
| Your server’s response | Process the POST without a redirect and without needing cookies or a login. |
Why the POST matters: some spam filters open the links in a message’s headers to inspect them, so an unsubscribe address that acts on a simple visit can remove people who never asked. RFC 8058 solves this with a POST request, which mail systems are told to send only with the user’s consent. Your server can act on the POST at once and still show a confirmation page to anyone who simply opens the address.
Mail systems are told not to offer one-click if DKIM does not cover both headers. Our explainer on SPF, DKIM and DMARC for bulk senders covers the basics.
How to set it up
- Check what your email platform already does. Your sending platform may add these headers already. Send yourself a test campaign and check the raw source for both.
- Generate a unique address per recipient and list. Use an opaque token rather than the plain email address, and verify it when a request arrives.
- Handle POST and GET differently. A POST carrying
List-Unsubscribe=One-Clickshould remove the person from that list straight away. A GET to the same address can show a page asking the person to confirm. - Sign the headers. Make sure your DKIM signing configuration includes
List-UnsubscribeandList-Unsubscribe-Postin the signed headers. - Keep the body link. Gmail and Yahoo both want one. The Gmail sender FAQ (opens in a new tab) says it can lead to a preferences page; only the headers need to be one-click.
- Act quickly. Gmail recommends fulfilling unsubscribe requests within 48 hours, and Yahoo asks for two days.
Here is a finished pair, with placeholder domain and token. RFC 2369 (opens in a new tab), the original list-header standard, wraps each address in angle brackets and separates alternatives with a comma:
List-Unsubscribe: <https://email.example.com/u/7f3a9c21e4>, <mailto:unsub@example.com?subject=unsubscribe>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
How do you test it?
Send a POST to a test subscriber’s address the same way a mail app would, then check that the subscriber is gone:
curl -i -X POST "https://email.example.com/u/7f3a9c21e4" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "List-Unsubscribe=One-Click"
It passes if the response is a success code, not a redirect, the subscriber leaves that list, and a plain GET removes nobody. RFC 8058 recommends sending the POST body as multipart/form-data and also allows the urlencoded format shown above, which Gmail’s example uses. If you run your own endpoint, accept and test both (curl’s -F "List-Unsubscribe=One-Click" sends multipart).
Common mistakes
- Relying on mailto alone. Yahoo accepts a mailto method but strongly recommends the POST method. Gmail’s FAQ is stricter: mailto links still work but do not meet its one-click requirement.
- Relying on the footer link. Gmail’s FAQ says a body or preferences link on its own, without the headers, does not meet the requirement.
- Pointing the header at a landing page. Gmail’s FAQ says a one-click link that leads to a landing or preferences page does not comply with RFC 8058.
- Letting the endpoint go down. Gmail says an unsubscribe link that stays broken for an extended period means your messages no longer meet the requirement.
- Unsubscribing people from everything. Gmail notes that one-click removes the person only from the list tied to that message, so map each header to the right list.
- Assuming the headers alone make Gmail show its button. Correct headers are necessary but not enough. Gmail decides per message, through automated checks, whether to show its own unsubscribe button at the top, based on overall compliance, gradual volume growth and spam reports.
Gmail’s FAQ also says it does not automatically reject or spam-folder mail just because one-click is missing. Our read: the risk is indirect. People who cannot leave easily tend to press “report spam”, and Gmail’s guidelines (opens in a new tab) ask senders to keep reported spam below 0.3%. Gmail also says only bulk senders that meet all its requirements are eligible for mitigation help if delivery problems arise. The same FAQ also says that from November 2025, non-compliant mail can face temporary and permanent rejections, which sits awkwardly with its one-click answer. Treat one-click as required, not optional.
Frequently asked questions
Does one-click unsubscribe apply to transactional email?
No. Gmail’s FAQ says the requirement covers marketing and promotional messages only, and gives password resets, reservation confirmations and form-submission confirmations as transactional examples. The FAQ also notes that the line between promotional and transactional can vary by industry and regulation, so keep promotions out of transactional mail.
Does it satisfy email marketing law?
Not by itself. Laws such as CAN-SPAM in the US and CASL in Canada set their own opt-out rules and deadlines, which our comparison of email marketing consent rules covers. Check your process with a qualified professional.
What should happen after someone unsubscribes?
Suppress the address for that list so an import cannot re-add it. Our routine for email list hygiene explains how unsubscribes fit with bounce handling and sunset policies.
Advertisement
Reach marketers while they are doing the work.
Sponsor a topic, a guide or a week of the daily briefing. Text-first placements, clearly labelled, no tracking scripts.
See advertising optionsSources
- RFC 8058: Signaling One-Click Functionality for List Email Headers (opens in a new tab) (RFC Editor)
- RFC 2369: The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields (opens in a new tab) (RFC Editor)
- Email sender guidelines (opens in a new tab) (Gmail Help)
- Email sender guidelines FAQ (opens in a new tab) (Gmail Help)
- Sender Best Practices (opens in a new tab) (Yahoo Sender Hub)
Standards and corrections
Claims are linked to the sources listed above so you can check them yourself. Our standards are set out in the editorial policy. Found a mistake? Send us a correction.