Skip to content
Groundmail

Guides

List-Unsubscribe and one-click unsubscribe headers, explained

What the List-Unsubscribe and List-Unsubscribe-Post headers do, raw examples, Gmail and Yahoo's rules, and which transactional emails need them.

By GroundmailUpdated All guides →

Short answer

List-Unsubscribe is an email header that gives mail apps a way to unsubscribe someone without opening the message: a mailto: address, an HTTPS URL, or both (RFC 2369). One-click unsubscribe adds a second header, List-Unsubscribe-Post: List-Unsubscribe=One-Click, which tells Gmail, Yahoo and other providers they can unsubscribe the reader with a single HTTPS POST to that URL (RFC 8058). The message also needs a DKIM signature that covers both headers.

Gmail and Yahoo require one-click unsubscribe on marketing and subscribed messages from bulk senders, and want unsubscribes honoured within two days. Pure transactional email such as password resets, sign-in codes and receipts doesn't need the headers, and is better without them. Digests, product updates and notifications people can switch off do need them.

What the two headers do

TopicList-UnsubscribeList-Unsubscribe-Post
SpecRFC 2369 (1998)RFC 8058 (2017)
ContainsOne or more URLs in angle brackets: mailto:, https: or bothExactly List-Unsubscribe=One-Click
What the mail app doesSends an email to the mailto: address, or opens the URLSends an HTTPS POST to the URL in List-Unsubscribe; the reader never leaves their inbox
NeedsNothing elseAn HTTPS URL in List-Unsubscribe and a DKIM signature covering both headers
Meets Gmail's one-click ruleNo, not on its ownYes, together with List-Unsubscribe

The headers are what put an Unsubscribe link next to the sender's name in Gmail and other mail apps. Google shows it only for messages that pass its own eligibility checks, so adding the headers doesn't guarantee the button appears. A visible link in the email body is still expected as well: it can go to a preferences page rather than unsubscribing straight away.

Raw header examples

RFC 2369: mailto and a web page

List-Unsubscribe only
List-Unsubscribe: <mailto:unsubscribe@example.com?subject=unsubscribe>
List-Unsubscribe: <mailto:unsubscribe@example.com>, <https://example.com/unsubscribe/opaque-token>

Each URL sits in angle brackets. With several, separate them with commas; the mail app uses the leftmost one it supports. A message carries one List-Unsubscribe header, so the two lines above are alternatives, not a pair.

RFC 8058: one-click unsubscribe

One-click headers
List-Unsubscribe: <https://example.com/unsubscribe/opaque-token>, <mailto:unsubscribe@example.com?subject=unsubscribe>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

When the reader clicks Unsubscribe, their mail provider sends this request to your URL. There are no cookies and no login: everything you need to identify the reader and the list has to be in the URL.

The POST your endpoint receives
POST /unsubscribe/opaque-token HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 26

List-Unsubscribe=One-Click

RFC 8058 also requires a valid DKIM signature whose h= tag lists both headers, so the receiver knows they came from the signing domain and weren't added on the way:

DKIM-Signature covering the headers (shortened)
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=selector1;
  h=from:to:subject:date:message-id:list-unsubscribe:list-unsubscribe-post;
  bh=...; b=...

RFC 8058 rules for the endpoint

  • One HTTPS URL in List-Unsubscribe. A mailto: can sit next to it, but Google says a mailto: on its own doesn't meet its one-click requirement.
  • List-Unsubscribe-Post holds exactly List-Unsubscribe=One-Click.
  • The URL identifies the reader and the list. The POST carries no other information. RFC 8058 says to use an opaque or hard-to-forge token rather than a plain email address, and to check it, so nobody can unsubscribe your readers by guessing URLs.
  • Unsubscribe on the POST and answer 200. Don't redirect (the RFC forbids it, because redirected POSTs often become GETs), and don't ask for a login or a confirmation step.
  • Don't unsubscribe on a GET. The same URL may be opened in a browser, and link-scanning security tools fetch URLs in email. Show a confirmation page on GET and act on the POST.
  • Accept both encodings. Providers send the body as application/x-www-form-urlencoded or multipart/form-data.
  • Sign with DKIM after the headers are added, with both headers in h=.

Gmail and Yahoo's one-click requirements

TopicGmailYahoo
Who it applies toSenders of more than 5,000 messages a day to Gmail accountsBulk senders (Yahoo doesn't publish a number)
Which messagesMarketing and subscribed messagesMarketing and subscribed messages
MethodRFC 8058 one-click headers with an HTTPS URL; mailto: alone doesn't countRFC 8058 POST highly recommended; mailto: acceptable
Visible link in the bodyRequiredRequired; may go to a preferences page
Honour unsubscribes within48 hours (recommended in Google's FAQ)2 days

From Google's sender guidelines, Google's sender FAQ and Yahoo's sender best practices.

Last checked on each vendor's public page.

Google says it doesn't automatically reject or spam-folder mail just for missing one-click unsubscribe, but senders who don't meet the requirements aren't eligible for its delivery mitigation, and readers who can't unsubscribe easily are more likely to press Report spam. Microsoft's rules for Outlook.com recommend a working unsubscribe link. The full set of authentication and volume rules is in Google, Yahoo and Microsoft sender requirements.

The law sets its own floor. In the US, the FTC's CAN-SPAM guide says commercial email needs an opt-out that keeps working for at least 30 days after sending and is honoured within 10 business days, and that transactional or relationship messages are exempt from most of the Act. Other countries have their own rules.

Does transactional email need List-Unsubscribe?

No. Google's FAQ says one-click unsubscribe is required only for marketing and promotional messages, and gives password resets, reservation confirmations and form submission confirmations as examples of transactional mail that's excluded. The same FAQ adds that "message recipients, not Google, determine the nature of the messages they receive", so what counts is how your readers see a message, not what you call it.

EmailUnsubscribe headers?Why
Password reset, sign-in code, magic linkNoThe reader just asked for it
Receipt, invoice, order or shipping updateNoPart of a transaction they made
Security alert, new sign-in, changed email addressNoThey must get it even if they've opted out of everything else
Activity notifications they can switch off ("someone commented")YesReaders see them as subscribed mail
Weekly digest or usage reportYesSubscribed mail
Onboarding tips, feature announcements, upgrade nudgesYesMarketing or subscribed mail
NewsletterYesMarketing

Adding the headers to a password reset isn't harmless. A reader who clicks Unsubscribe on it usually lands on your suppression list, and then their next password reset doesn't arrive. Keep unsubscribe for mail people can do without, and send account and security mail without it. Don't mix the two in one message either: Google's guidelines say not to put promotions in receipts. Send them as separate emails.

How Groundmail sets the headers

Groundmail adds the one-click headers for you, based on each email's category, and runs the unsubscribe endpoint. Each category also goes out on its own servers and IPs, so a product announcement never shares IPs with your sign-in codes.

CategoryUnsubscribe headersWhat one-click does
transactional (the default)Off. Turn on per send with unsubscribe: trueAdds the address to your suppression list
productOn automaticallyOpts the reader out of product email only; transactional email still arrives
newsletter (approved accounts)Always on; can't be turned offOpts the reader out of newsletter email only

From the emails API docs and suppressions docs.

When managed unsubscribe is on, Groundmail adds both headers with a signed HTTPS link bound to the first to address, and replaces {{unsubscribe_url}} in your subject, HTML and text with a link to a confirmation page. The one-click URL only unsubscribes on a POST; opening it in a browser shows the confirmation page, so link scanners can't unsubscribe anyone by accident.

Headers on a product email sent through Groundmail
List-Unsubscribe: <https://app.groundmail.dev/api/unsubscribe?token=...>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
Node: a weekly digest with one-click unsubscribe
import { Groundmail } from 'groundmail'

const groundmail = new Groundmail(process.env.GROUNDMAIL_API_KEY!)

await groundmail.emails.send({
  from: 'Acme <digest@mail.acme.com>',
  to: 'jane@example.com',
  subject: 'Your week in Acme',
  html: '<p>...</p><p><a href="{{unsubscribe_url}}">Unsubscribe from the weekly digest</a></p>',
  category: 'product', // adds List-Unsubscribe and List-Unsubscribe-Post
})
  • Afterwards: a send in that category to someone who opted out returns 422 with details.category_unsubscribed, and a contact.unsubscribed webhook tells your app, with data.scope of category or all.
  • Templates: set unsubscribe_enabled on a template, and product templates turn it on for you.
  • Your own endpoint: send with unsubscribe: false and pass your own List-Unsubscribe and List-Unsubscribe-Post in headers, or set them as headers over the SMTP relay. Newsletter email always uses Groundmail's.
  • Re-subscribes: list and remove opt-outs with GET and DELETE /suppressions?type=category_opt_out, only when the reader asked to hear from you again.
  • Platforms: with tenants, an unsubscribe from one customer's email applies to that customer only. See sending email on behalf of your customers.

How to check your headers

  1. 01Look at a received messageIn Gmail, open the message, then the three dots and Show original. Check that List-Unsubscribe holds an https: URL and List-Unsubscribe-Post reads List-Unsubscribe=One-Click.
  2. 02Check the DKIM signature covers themIn the same view, find the DKIM-Signature for your domain and check its h= tag lists list-unsubscribe and list-unsubscribe-post, and that Authentication-Results shows dkim=pass. The header analyzer reads the results for you.
  3. 03Run a deliverability testThe free email deliverability test checks for one-click unsubscribe on bulk mail, along with SPF, DKIM, DMARC and content.
  4. 04Call your endpoint the way a provider wouldcurl -i -X POST -d 'List-Unsubscribe=One-Click' 'https://example.com/unsubscribe/opaque-token' should return 200 with no redirect, and the reader should be gone from the list.

Common mistakes

MistakeWhat happensFix
Only a mailto: URLDoesn't meet Gmail's one-click requirementAdd an HTTPS URL and List-Unsubscribe-Post
List-Unsubscribe-Post without an HTTPS URLProviders can't do the POST, so no one-clickPut the HTTPS URL first in List-Unsubscribe
Headers not covered by DKIMProviders may not offer one-clickAdd the headers before signing; check h=
The endpoint redirects or asks for a loginThe POST fails and the reader stays subscribedUnsubscribe on the POST and return 200
Unsubscribing on GETSecurity scanners that open links unsubscribe your readersConfirm on GET, unsubscribe on POST
The reader's email address in plain text in the URLAnyone can unsubscribe anyoneUse a signed or random token
Headers on password resets and receiptsOne click and the reader stops getting account emailOnly add them to mail people can do without
One unsubscribe for everythingLeaving a digest also stops receiptsUnsubscribe from that kind of mail only
Unsubscribes processed in a weekly batchMore mail after they asked to stop, and spam reportsHonour them within 2 days, ideally at once

Frequently asked questions

What is the List-Unsubscribe header?

An email header, defined in RFC 2369, that lists a mailto: address or URL for unsubscribing from the mail. Mail apps use it to show an Unsubscribe link near the sender's name, so readers can leave without opening the message or hunting for a footer link.

What is one-click unsubscribe?

RFC 8058's extension to List-Unsubscribe. With List-Unsubscribe-Post: List-Unsubscribe=One-Click and an HTTPS URL in List-Unsubscribe, the mail provider unsubscribes the reader with one HTTPS POST, with no web page, login or confirmation. The message needs a DKIM signature covering both headers.

Is a mailto List-Unsubscribe enough for Gmail?

No. Google's FAQ says mailto links don't meet its one-click requirement: you need List-Unsubscribe-Post and an HTTPS URL in List-Unsubscribe. Yahoo accepts mailto but highly recommends the RFC 8058 POST method. Sources: Google, Yahoo.

Do transactional emails need a List-Unsubscribe header?

No. Gmail and Yahoo require one-click unsubscribe only for marketing and subscribed messages. Password resets, sign-in codes, receipts and security alerts don't need it, and adding it risks readers suppressing the account email they need.

Why doesn't Gmail show an Unsubscribe link for my emails?

Gmail shows the link next to the sender's name only for messages that pass its own eligibility checks: correct one-click headers covered by DKIM, the sender requirements, and a sending history without high spam reports. The headers alone don't guarantee it.

How fast do I need to process unsubscribes?

Yahoo says within 2 days, and Google recommends 48 hours. In the US, CAN-SPAM allows up to 10 business days for commercial email. Processing them immediately is simplest.

Does Groundmail add List-Unsubscribe automatically?

For product and newsletter email, yes, with one-click and a hosted unsubscribe endpoint. Transactional email, the default, goes out without it unless you send with unsubscribe: true. See the emails API docs.

Sources

Facts on this page about other companies' products, prices and policies come from these public pages. They change, so check them before you decide.

Email for apps. Set up by your agent.

Sign-in codes, receipts and alerts kept separate from marketing mail, with inbound, templates and automations included. Start free with 3,000 emails a month, and move to a dedicated IP or server without changing your code.