List-Unsubscribe header generator
The List-Unsubscribe header puts an unsubscribe control in the mail app's own interface, so a reader who is done with your mail leaves with one click instead of marking it as spam. This generator writes the header lines for you: the angle-bracketed https link and address, and the fixed one-click companion header from RFC 8058, with checks for the mistakes that make receivers ignore them.
Put a token that identifies the recipient and the list in the link. It can include {{token}} for your sending platform to fill in.
Enter an https URL, an address, or both.
The URL and address you type are turned into header text by code running in this page and are never sent anywhere.
How it works
- The URL is checked: it must start with https, contain no spaces, quotes, angle brackets or commas, and have a valid domain name. A plain http link is refused.
- The address, if given, is checked for valid syntax and written as a mailto link with the subject unsubscribe, the form used in the RFC 8058 examples.
- Each target goes inside angle brackets and the targets are joined with a comma and a space, as RFC 2369 describes. The https link comes first.
- With one-click on, a second header is added whose value is exactly List-Unsubscribe=One-Click, the only value RFC 8058 allows.
- The tool then lists the header names your DKIM signature must cover, ready for the signing settings of your sending platform.
- Warnings flag a link that does not look recipient-specific, a header line over the 998 character limit, and a sender who has not turned one-click on.
Limits
- Adding the header is not enough on its own. Your server must accept an HTTP POST at the link and unsubscribe the recipient at once, with no further click, and it must not answer with a redirect.
- The message must carry a valid DKIM signature that covers both headers. Without it, a receiver should not offer the one-click control for that message.
- The token check is a guess from the shape of the link. It cannot know whether your server really verifies the token, so test it.
- Most sending platforms add these headers for you. Use this generator for platforms that let you set custom headers, for mail you send from your own system, or to check what your platform sends.
- Thresholds for bulk senders are set by Gmail and Yahoo and can change. The figures on this page were read on the date shown in the sources.
Related tools
DKIM generatorCreate a DKIM key pair in your browser and get the exact DNS host, the TXT value and the split strings, plus the private key to install.DKIM checkerFind a domain's DKIM key, read its length and status, and get the exact fix when something is wrong.DMARC record generatorSPF record generatorEmail header analyzerPaste raw headers to trace the route a message took, see the delay at each hop and read the SPF, DKIM and DMARC results in plain English.