# Put an unsubscribe link in your emails

> Put the {{ UNSUBSCRIBE_URL }} tag in with Insert variable or in the Custom HTML editor, because each campaign email needs an unsubscribe link.
>
> Source: https://docs.mailniaga.com/unsubscribe-link/

With an unsubscribe link, a subscriber can stop your emails with one click. Each campaign email must have this link. In Mail Niaga, this link is the tag `{{ UNSUBSCRIBE_URL }}`.

## Why the unsubscribe link is important

If recipients cannot find a way to unsubscribe, many of them will click the spam button. Spam complaints damage your sending reputation. Then Gmail, Yahoo and other providers start to put your emails in the spam folder. Anti-spam laws (for example CAN-SPAM) also make an unsubscribe link necessary in marketing emails.

## Put the link in the email builder

Some gallery designs, for example **Make an announcement**, already have an "unsubscribe" link at the bottom. If your design does not have this link, make a text into a link, with the tag as the URL.

1. Write a text such as "Unsubscribe" at the bottom of the email.
2. Double-click the text, then select the text.
3. Click the **Link** button on the text toolbar (Ctrl+K).
4. In **URL**, type `{{UNSUBSCRIBE_URL}}`.
5. Click **Apply**, then click **Save**.

*(Screenshot: The Link popup in the email builder with {{UNSUBSCRIBE_URL}} in the URL field)*

For a **Button** or **Image** block, click the block. On the panel, click the **{ }** button (**Insert variable**) next to the **URL** field, then choose **Unsubscribe link**.

Do not use the **{ }** button on the text toolbar for links. That button puts the tag in as plain text, not as a link.

## Put the link in Custom HTML

In the Custom HTML editor, make a text into a link, with the tag as the URL.

1. Select the text "Unsubscribe" in the editor.
2. Click the link button (**Insert/edit link**) on the toolbar.
3. In **URL**, type `{{ UNSUBSCRIBE_URL }}`.
4. Click **Save** in the popup, then click **Save HTML**.

*(Screenshot: The Insert/Edit Link popup with {{ UNSUBSCRIBE_URL }} in the URL field)*

If you write your own HTML in source mode (**Edit Source** in a campaign, **Edit source** in a template), use `<a href="{{ UNSUBSCRIBE_URL }}">Unsubscribe</a>`.

> **Caution**
> Type the tag exactly as above. `{{ UNSUBSCRIBE_URL }}` and `{{ unsubscribe_url }}` work. A mix of capital and small letters, such as `{{ Unsubscribe_Url }}`, does not work.

## The check before the campaign is sent

In the **Confirm** step, Mail Niaga checks your email in the **Pre-flight checklist**. If the unsubscribe link is not there, the list shows "Missing unsubscribe link".

For some plans, Mail Niaga makes this link mandatory. Then the row has the mark **Needs attention**, and you cannot launch the campaign until you put in the link. For other plans, the row has the mark **Review**. You can still launch the campaign, but we recommend that you put in the link.

If all is correct, you see "All checks passed".

*(Screenshot: The Pre-flight checklist in the Confirm step with all the checks passed)*

## What the subscriber sees

When a subscriber clicks the link, the "Confirm unsubscribe" page opens with the email address of that subscriber. After the subscriber clicks **Yes, unsubscribe me**, Mail Niaga changes the status to **Unsubscribed**. A click on the link alone does not change the status of the subscriber. Because of this, the link scanners in email applications do not unsubscribe a subscriber by accident.

This page is a system page. Changes to the **Unsubscribe form** in the **Forms / Pages** of your list do not show on this page. See [Unsubscribe page and goodbye email](https://docs.mailniaga.com/unsubscribe-form/).

## Tips

This advice helps you make the unsubscribe link work for your readers:

- **Put the link where readers can see it.** Readers usually look for it at the bottom of the email.
- **Click the link in your test email.** Make sure that the link opens the unsubscribe form, not an error page.

## Common issues

### What must I do if "Missing unsubscribe link" shows in the Confirm step?

Your email does not have the {{ UNSUBSCRIBE_URL }} tag. Go back to the Template step, put in the unsubscribe link and save. Then open Confirm again.

### Why does the link not work when I write {{ Unsubscribe_Url }}?

The tag must be exact: {{ UNSUBSCRIBE_URL }} (capital letters) or {{ unsubscribe_url }} (small letters). A mix of capital and small letters does not work.
