# Email double opt-in links

Create links for completing the email double opt-in process.

## About double opt-in links

When using [[Double Opt-In](https://www.airship.com/docs/reference/glossary/#double_opt_in)](https://www.airship.com/docs/developer/api-integrations/email/getting-started/#double-opt-in), you must include an **opt-in link** in both the HTML and plain text message bodies. When the user follows the opt-in link, Airship updates their channel as opted in to email messaging and redirects to the confirmation web page that tells them they are opted in.

The Airship-hosted **default confirmation web page** displays the message "You have been successfully opted in." You can also link to **your own confirmation web page** instead.

## Double opt-in link formatting

To use the **default confirmation page**, include the following in your message:

* *HTML body* — Paste this HTML:
```html
<a data-ua-opt-in="1" title="Opted in">Link Title</a>
```


* *Plain text body* — Paste this content: `[[ua-opt-in]]`

To use **your own confirmation page**, include the following in your message:

* **HTML body** — Paste this HTML (it includes a `data-ua-opt-in="1"` attribute), replacing the `href` URL with your own:
```html
<a data-ua-opt-in="1" title="Opted in" href="https://www.example.com/confirmed">Link Title</a>
```


* **Plain text body** — Paste this content, replacing the `href` URL with your own:
   `[[ua-opt-in href="https://www.example.com/confirmed"]]`

## Double opt-in links in the WYSIWYG editor

When using the [WYSIWYG editor](https://www.airship.com/docs/guides/messaging/features/wysiwyg-editor/) to create email content, you can add opt-in links in the [HTML, Heading, and Text content elements](https://www.airship.com/docs/guides/messaging/features/wysiwyg-editor/styling-formatting/#content-elements).

In the HTML content element, use the code specified for *HTML body* in [Double opt-in link formatting](#double-opt-in-link-formatting) above.

In Heading and Text content elements:

1. Select text in your message and click the Link  option.
1. Select the *Confirm subscription* action.
1. Enter the URL for your confirmation page or enter one of the following URLs for the default confirmation page. For the default page, use the URL that matches your data center location:
   * US: `https://asemailmgmtus.com/opt-in/success.html`
   * EU: `https://asemailmgmteu.com/opt-in/success.html`
1. Click **Save**.

See also: [Actions in the WYSIWYG editor](https://www.airship.com/docs/guides/messaging/features/wysiwyg-editor/actions/).
