# SMS: Link shortening

When you enable SMS and turn on the setting *Shorten links*, we shorten links in your SMS and WhatsApp message bodies. This page explains how link shortening works.

## How it works[](#how-it-works)

In *Workspace settings > SMS*, you’ll see a toggle for **Shorten links**. When this is enabled, **we automatically shorten links in your SMS/MMS messages**.

When someone clicks a shortened link, the link directs them to Customer.io, where we’ll resolve the link and then send your audience to the ultimate destination.

Shortened links are especially helpful with [link tracking](#track-link-clicks). By default, we track the links that people click in your SMS or WhatsApp messages, but tracked links won’t reliably fit inside a 160 character SMS message; shortened links fix that!

 We filter short links for profanities

We filter short link paths to ensure the randomly generated characters don’t contain profanities. If you see something inappropriate in a link path, please [let us know](mailto:support@customer.io).

### Short link format[](#short-link-format)

Shortened links use the format `https://a.cx.io/lnk.abc123` (or `https://e.cx.io/lnk.abc123` if you’re in our EU region). If you don’t use a custom domain, shortened links consume between 26 and 36 characters (out of the 160-maximum for SMS):

*   8 for the `https://` prefix.
*   7 for the default domain (`a.cx.io` or `e.cx.io`). Your custom short link domain could consume fewer characters.
*   11-16 characters for the path (the slash and random characters `/lnk.abc123`). We start with a 10 character path and increase the length until we find a path that isn’t in use.
*   Shortened links expire after 90 days.

## Enable or disable link shortening[](#enable-or-disable-link-shortening)

If you don’t want to shorten links, you can disable link shortening. But if you don’t shorten links, keep in mind that you probably won’t want to track links in your messages because tracked links consume significant space in your messages.

Enabling or disabling link shortening affects all messages in your workspace—including active messages.

1.  Go to your **[\> workspace settings > SMS](https://fly.customer.io/workspaces/last/settings/actions/twilio).**
    
2.  Turn **Link shortening** on or off. [Add a custom short link domain](#add-a-custom-short-link-domain) if you want to use a custom domain. Otherwise, your shortened links will use the default domain (`a.cx.io` for the Americas or `e.cx.io` for our EU region).
    
    [![Disable link shortening](https://docs.customer.io/images/sms-link-shortening-disable.png)](#73e72798bc27a6b6f0fdc15a5c7fc1a3-lightbox)
    

## Add a custom short link domain[](#add-a-custom-short-link-domain)

Custom short link domains help you brand your links and make them easier for your audience to recognize. You can add up to 10 custom short link domains per workspace, which are shared across your SMS and WhatsApp channels; any domain you add is available for both channels, and you can set the default domain for each channel.

As a part of this process, you’ll need to add CNAME and TXT records to your domain to verify that you own it and grant Customer.io permission to use it. Your custom short link domain *cannot* be the same domain you use for [email link tracking](/journeys/link-tracking-custom-domain/#set-up-link-tracking-for-your-domain).

1.  Go to your [**\> Workspace settings > SMS**](https://fly.customer.io/workspaces/last/settings/actions/twilio) or [**WhatsApp**](https://fly.customer.io/workspaces/last/settings/actions/whatsapp) settings.
2.  Click **Add custom domain**.
3.  Enter your custom domain and click **Add domain**.
    
    [![The prompt to add a custom domain with an ex.amp.le domain.](https://docs.customer.io/images/sms-link-shortening-add-domain.png)](#88f55148ab94c26e97858279a23e6375-lightbox)
    
4.  Go to your domain registrar and add the appropriate records to your domain. The *Add custom domain* dialog contains the values you’ll need to copy to your domain host.
    *   **CNAME record**: points your custom domain to Customer.io’s servers.
    *   **TXT record**: verifies that you own the domain. The record name uses the format `_cio.yourdomain.com`.
        
        [![The records you need to add to your domain host.](https://docs.customer.io/images/sms-short-link-records.png)](#e62f15b30786b81258c7b6395f9779ac-lightbox)
        

It can take up to 24 hours for these records to propagate, though it usually happens much faster. Until then, you’ll see that your custom domain is *pending*. In many cases, you can wait a minute or two and refresh the page to see that your custom domain is *active*.

[![A custom short link domain that is pending is shown in the workspace settings page.](https://docs.customer.io/images/sms-short-link-pending.png)](#67bc44d4b168f7d20de683055d9ef7fa-lightbox)

### Use multiple short link domains[](#multiple-domains)

You can add more than one custom short link domain to your workspace. This is helpful if you operate multiple brands, want to separate domains by message type, or want to rotate domains.

When you have multiple custom domains, you’ll set one as the **workspace default**. This is the domain that all your shortened links use unless you override it for a specific message. Go to your SMS or WhatsApp settings and click **Set as default** next to the domain you want to use as the default for that channel; SMS and WhatsApp each have their own default domain.

## Track link-clicks in your messages[](#track-link-clicks)

By default, we track the links that people click in your SMS and WhatsApp messages. To do this, Customer.io appends tracking code to your URLs, which makes them much longer than the original link. These long URLs can easily push your message over the 160-character limit for SMS.

Shortened links solve this problem by letting you track clicks without using up extra space.

If you [don’t use Customer.io’s shortened links](#enable-or-disable-link-shortening), then you should disable link tracking for your message. You’ll need to do this for each SMS or WhatsApp message individually.

You can also enable or disable link tracking on a per-link basis using the `{% cio_link %}` [liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable `{{customer.first_name}}`.](/using-liquid) tag with the `track` parameter; `track` is a boolean where `true` enables tracking and `false` disables it. It’s `true` by default.

### Enable or disable URL parameters[](#enable-or-disable-url-parameters)

You configure URL parameters in [Workspace Settings](https://fly.customer.io/workspaces/last/settings/actions/url_params). Check out [URL parameters](/journeys/url-parameters/) for more info.

To track URL parameters, you must wrap links in the `{% cio_link %}` tag.

```text
{% cio_link url:"https://example.com" %}
```

If you want to disable URL parameters for a specific link, set `url_params` to `false`:

```text
{% cio_link url:"https://example.com" url_params:false %}
```

### Disable link tracking for individual links[](#disable-link-tracking-for-individual-links)

To disable tracking for a specific link while keeping URL parameters enabled:

```text
{% cio_link url:"https://example.url" track:false %}
```

[![An image showing a shortened links in the preview of an SMS message](https://docs.customer.io/images/sms-shortened-link.png)](#eaf462982ada519f8957013accce4855-lightbox)

### Short link expiration[](#short-link-expiration)

Short link paths expire after 90 days. Your workspace *can* reuse paths after they expire, but immediate reuse is unlikely given the large number of possible combinations.

While it’s unlikely that an expired path gets reused, or that users engage with messages older than 90 days, you should require a login if you send links to sensitive information. This ensures that you don’t expose personal information to users who click old links.

 Do you need to extend the expiration period?

If you’re on a premium or enterprise plan, [contact us](mailto:win@customer.io?subject=Request%20for%20extended%20short%20link%20expiration%20period) to request a longer expiration period for your shortened links.