How to Implement One-Click Unsubscribe (RFC 8058)

The short answer
Add two message headers: a List-Unsubscribe header containing an HTTPS URI, and List-Unsubscribe-Post set to List-Unsubscribe=One-Click. Cover both with your DKIM signature. Then host an HTTPS endpoint that accepts an unauthenticated POST with the body List-Unsubscribe=One-Click, unsubscribes the address server-side, sets no cookies, and never redirects.
How to implement one-click unsubscribe (RFC 8058): the two headers, DKIM coverage, and the unauthenticated POST endpoint bulk senders now need.
On this page
If you send marketing email in bulk, this guide shows how to implement one-click unsubscribe the way RFC 8058 defines it: two message headers, both covered by your DKIM signature, and a small HTTPS endpoint that accepts an unauthenticated POST.
It is a sender task, not a mailbox setting. Google, Yahoo and Apple require it for marketing mail, and most first attempts fail on the same few details: a cookie on the endpoint, an HTTP redirect, or a header left out of the DKIM signature. We will fix those before they cost you a delivery.
The short answer#
One-click unsubscribe needs four things to line up. Miss any one and mailbox providers treat the offer as absent.
End to end, it works like this: the provider reads your headers, the recipient taps Unsubscribe, and the provider posts to your endpoint. No login, no landing page, no confirmation click. Your server does the removal and returns a success.
- A List-Unsubscribe header whose value includes one HTTPS URI. A mailto: address may sit alongside it as a fallback.
- A List-Unsubscribe-Post header with the exact value List-Unsubscribe=One-Click.
- Both headers covered by a valid DKIM signature and listed in the signature's h= tag.
- An HTTPS endpoint that accepts an unauthenticated POST with the body List-Unsubscribe=One-Click, removes the address, and does not redirect.
What the headers look like#
The two headers travel on every marketing message. The provider reads them, and when the recipient taps Unsubscribe it sends the POST on their behalf.
The HTTPS URI carries a per-recipient token, shown here as 8f2c1a. That token is how your endpoint knows who to remove without asking anyone to log in. The mailto: address is optional and only serves older clients that do not support one-click.
Before you start#
A few things need to be true before the headers do anything.
- You already pass DKIM. One-click rides on DKIM; without a valid signature covering the two headers, the mechanism is void.
- Your unsubscribe URL is reachable over HTTPS. RFC 8058 requires an HTTPS URI. Plain HTTP is not accepted.
- You can identify the subscriber from the URL alone. The spec needs enough data in the link to unsubscribe automatically, with no session and no cookie.
- The mail is marketing or subscribed mail, not transactional.
Transactional mail is exempt
Implement it step by step#
Six steps, in order. The first three go on the message; the last three build and lock down the endpoint.
- 1
Add the List-Unsubscribe header
Set List-Unsubscribe to one HTTPS URI in angle brackets. The URI must carry a token that identifies the subscriber, so no login is needed. You may add a mailto: address after it as a fallback for older clients.
- 2
Add the List-Unsubscribe-Post header
Set it to exactly List-Unsubscribe=One-Click. RFC 8058 requires this single key/value pair and nothing else. Its presence is what tells the provider your HTTPS URI will accept a one-click POST.
- 3
Cover both headers with DKIM
List both List-Unsubscribe and List-Unsubscribe-Post in the h= tag of your DKIM-Signature. RFC 8058 requires them to be covered by a valid signature. If they are not signed, providers ignore the one-click offer even when the headers are present.
- 4
Stand up the POST endpoint
At the unsubscribe URL, accept an HTTPS POST. The request body will be List-Unsubscribe=One-Click, form-encoded (multipart/form-data is also allowed). Read the subscriber token from the URL, not from the body.
- 5
Keep the endpoint stateless
Require no cookies, no session and no authorization. RFC 8058 says the POST must not include cookies, HTTP authorization, or any other context. And do not answer with an HTTP redirect: the spec forbids it, because redirected POSTs have historically been unreliable.
- 6
Unsubscribe, then return success
Remove the address from the list and return a plain HTTP success such as 200 OK. The RFC does not mandate a status code, but the request is a machine action, so do the work server-side and answer quickly with no page to render.
One trap: guard the GET path#
There is a single mistake that breaks otherwise-correct implementations, and it can quietly unsubscribe real people. Automated systems follow links.
Only unsubscribe on the one-click POST
Platform differences#
The mechanism is one standard, but the mailbox providers scope it differently. Requirements change, so confirm current terms on each provider's postmaster page before you rely on this table (checked August 2026).
| Provider | One-click status | Who it applies to | Notes |
|---|---|---|---|
| Gmail | Required for marketing and subscribed mail | Senders of 5,000+ per day to Gmail accounts | Google's guidelines cite RFC 2369 and RFC 8058; non-compliant bulk mail risks spam-foldering or rejection. |
| Yahoo | Required for marketing mail | High-volume senders (about 5,000 per day) | Confirm current terms on the Yahoo Sender Hub. |
| Apple (iCloud Mail) | Required for marketing mail | Threshold not publicly numbered | Verify against Apple's postmaster guidance before relying on it. |
| Microsoft (Outlook.com) | Recommended, not required | High-volume senders | Runs its own bulk-auth regime (SPF, DKIM, DMARC); failing authentication can get mail rejected. |
What to do when it doesn't work#
Most first attempts fail on the same handful of details. Match the symptom to the likely cause, then apply the one-line fix.

| Symptom | Likely cause | Fix |
|---|---|---|
| No Unsubscribe control appears | A header is missing, or the headers are not in the DKIM h= tag | Confirm both headers are present and signed |
| People unsubscribed without clicking | The endpoint acts on GET, and a scanner fetched the URL | Unsubscribe only on POST with body List-Unsubscribe=One-Click |
| The POST arrives but no one is removed | The code reads the subscriber from a cookie or session that is not sent | Identify the subscriber from the URL token instead |
| The provider marks the unsubscribe failed | The endpoint returned a redirect or an error status | Do the work server-side and return 200 OK directly |
| Works in staging, fails in production | A header was added or reordered after signing, breaking DKIM | Sign the message after the final header set is assembled |
How to test it#
To confirm the whole path, send a test to a Gmail or Yahoo mailbox. Check that an Unsubscribe control shows next to your sender name, that clicking it removes you, and that it lands you on nothing because the provider handled it in the background.
If the control never appears, the cause is almost always the DKIM h= tag rather than the headers themselves. Re-sign a test message with both header names in h= and try again.
A faster way: where AI Emaily fits#
Everything above is sender-side work. You are the one running the campaigns, and RFC 8058 is how you let people leave them. AI Emaily sits on the other side of that exchange.
We are a mail client, not an email service provider. We do not send your campaigns and we do not generate your List-Unsubscribe headers; your sending platform does that. What we do is the receiving job: triage the flood those campaigns create. Our cold-email filter and spam protection keep unsolicited outreach and low-value bulk mail out of the way, so the marketing you did not opt into does not bury the mail that matters. We build AI Emaily. If your problem is the inbox rather than the send, that is the part we work on.
Frequently asked
See it in AI Emaily
Sources

Written by
Nafiul HasanNafiul Hasan is an entrepreneur and AI automation system builder with 10+ years of experience turning messy, manual workflows into reliable automated systems. He designs and ships AI enterprise solutions end-to-end — the agent logic, the data plumbing, and the product people actually use — and founded AI Emaily to give busy professionals their attention back. He writes here from the builder's seat: what works, what breaks, and how to put AI to work without giving up control.