# Why is the unsubscribe link missing from my campaign?

> Fix the "Missing unsubscribe link!" warning and links that show {{unsubscribe_url}} as text. Learn how unsubscribe works in campaigns and API mail.

This article helps when a campaign warns that the unsubscribe link is missing, or recipients see the raw text `{{unsubscribe_url}}` instead of a working link.

## Symptoms

- The send step of the campaign shows **Missing unsubscribe link!** with "Add unsubscribe variable `{{unsubscribe_url}}` to your campaign content."
- The received email shows `{{ unsubscribe_url }}` as plain text, or the link goes nowhere.
- Recipients mark your campaign as spam because they can't find a way to opt out.

## Cause

Every campaign email gets a personal unsubscribe address. Emailit uses it in two places:

- **In the message headers.** Emailit adds `List-Unsubscribe` and `List-Unsubscribe-Post: List-Unsubscribe=One-Click` to every campaign email, so Gmail, Yahoo and others can show their own **Unsubscribe** button.
- **In your content.** The merge tag `{{unsubscribe_url}}` is replaced with the same address. If your content doesn't contain it, there's no visible link in the email.

Common causes:

- **The tag isn't in the content**, for example after you pasted HTML from another tool or chose a template without a footer.
- **The tag has spaces.** Only `{{unsubscribe_url}}` is replaced. `{{ unsubscribe_url }}` passes the check but is sent as literal text.
- **A different tool's tag** is used, such as `*|UNSUB|*` or `[unsubscribe]`.

The warning doesn't stop you from sending, but you should fix it. A visible unsubscribe link is required by laws such as CAN-SPAM and by Gmail and Yahoo for bulk mail.

## Fix

1. **Add the link to your content.** In the HTML editor, add it to your footer:

```html
<a href="{{unsubscribe_url}}">Unsubscribe</a>
```

   In the rich-text editor, type `@` and choose **Unsubscribe URL**. In the drag-and-drop editor, set a link's URL to `{{unsubscribe_url}}`.

2. **Remove spaces inside the braces.** Search your content for `unsubscribe_url` and make sure it's written exactly as `{{unsubscribe_url}}`.

3. **Fix your templates too.** If you start campaigns from a [template](/docs/templates/), add the link to the template so future campaigns include it.

4. **Test it.** On the preview step, select **Send test** and check that the email shows a real link instead of the raw tag. Test sends use a placeholder address, so clicking it doesn't unsubscribe anyone. In real campaign emails, the link unsubscribes the contact from every audience they're in and offers a **Resubscribe** button.

5. **Check the send step again.** The warning changes to **No problems detected!**

Emails sent with the API, SMTP or [automations](/docs/automations/) don't get unsubscribe headers or links automatically. For marketing mail sent that way, add your own link and `List-Unsubscribe` headers. See [How do I meet Gmail and Yahoo bulk sender requirements?](/docs/kb/gmail-yahoo-bulk-sender-requirements/). Learn more in [Merge tags](/docs/campaigns/merge-tags/) and [Unsubscribes](/docs/audiences/unsubscribes/).

## Still stuck?

[Contact support](/contact/) or ask in [Discord](https://discord.emailit.com) with the campaign name and the part of your HTML that contains the link.

---
Source: https://emailit.com/docs/kb/unsubscribe-link-missing/
