Custom Domains for Short Links
Take advantage of your highly-recognizable brand and increase conversions while saving characters in SMS messages using Airship-shortened links with a custom domain.
You can replace Airship’s standard airsp.co
or airsp.eu
domains for shortened links with your own custom short link domain. To take advantage of a shortened, custom domain, you must:
Register your short domain name with a Domain Name Registrar.
Your custom short link domain can include a subdomain, but it cannot include a path.
- Supported:
https://my.site.co
- Not Supported:
https://mysite.co/path
Note While your custom short link domain cannot contain a path, the links that you use in your messages can, of course, contain paths.
- Supported:
Host your domain. Airship supports custom short link domains using HTTP and HTTPS.
Implement a redirect configuration applicable to the web server you use. This document contains instructions for a few common web servers.
- nginx server configuration
- Apache server configuration
- Microsoft IIS configuration
Note Sample configurations on this page may differ from your actual setup.
Contact Airship Support to enable your custom short link domain.
When you send an SMS/MMS message from Airship with link shortening enabled:
- Your end users will receive a shortened link, e.g.,
http://mysite.co/abcd1234
. - Your domain must forward
http://mysite.co/abcd1234
tohttps://airsp.co/abcd1234
orhttps://airsp.eu/abcd1234
(depending on your Airship data center). - Airship will handle the final redirect to the full URL that you provided in your original message, e.g.,
http://myfullsite.com/longURL?query=1234
.
Nginx Server Configuration
Use one of the following configurations to redirect your custom short link domain to Airship. The request_uri
appended to your custom short link domain — e.g., https://mysite.co/abcd1234
— passes through to Airship’s short link domain — e.g., https://airsp.co/abcd1234
. Airship then resolves the shortened link, redirecting the user to the original link in your message — e.g., https://myfullsite.com/deals?cart=4321id=0987lkjh
.
server {
listen 80;
location / {
return 303 https://airsp.co$request_uri;
}
}
server {
listen 80;
location / {
return 303 https://airsp.co$request_uri;
}
}
server {
listen 443 ssl;
ssl on;
ssl_certificate /etc/nginx/ssl-certs/airsp.crt;
ssl_certificate /etc/nginx/ssl-certs/airsp.key;
location / {
return 303 https://airsp.co$request_uri;
}
}
Apache Server Configuration
Use one of the following configurations to redirect your custom short link domain to Airship. The request_uri
appended to your custom short link domain — e.g., https://mysite.co/abcd1234
— passes through to Airship’s short link domain — e.g., https://airsp.co/abcd1234
. Airship then resolves the shortened link, redirecting the user to the original link in your message — e.g., https://myfullsite.com/deals?cart=4321id=0987lkjh
.
mod_rewrite
module is enabled, add the following lines to your sites-available/000-default.conf
file.<VirtualHost *:80>
... other .conf code...
<Location />
Redirect 303 https://airsp.co%{REQUEST_URI}
<Location>
</VirtualHost>
sites-available/default-ssl.conf
file, add a Location
directive block containing the following:<VirtualHost _default_:443>
... other .conf code...
<Location />
Redirect 303 https://airsp.co%{REQUEST_URI}
</Location>
</VirtualHost>
In your sites-available/000-default.conf
file add the following two lines. This assumes that the mod_rewrite
module is enabled for your server.
<VirtualHost *:80>
... other .conf code...
<Location />
Redirect 303 https://airsp.co%{REQUEST_URI}
<Location>
</VirtualHost>
Microsoft IIS Configuration
Use the following configuration to redirect your custom short link domain to Airship. The request_uri
appended to your custom short link domain — e.g., https://mysite.co/abcd1234
— passes through to Airship’s short link domain — e.g., https://airsp.co/abcd1234
. Airship then resolves the shortened link, redirecting the user to the original link in your message — e.g., https://myfullsite.com/deals?cart=4321id=0987lkjh
.
- Click Default Web Site.
- In the Feature View, click URL Rewrite.
- In the Actions panel, click Add rules….
- In the Add Rules dialog, select Blank Rule and click OK.
- When defining the Rewrite Rule, set the following:
- Requested URL:
Matches the Pattern
- Using:
Regular Expressions
- Pattern:
[^/]*$
, which matches the request URI through the end of the regex string - Ignore Case: unchecked
- Action Type: Redirect
- Redirect URL:
https://airsp.co/{R:0}
where{R:0}
specifies the request URI - Append query string: unchecked
- Redirect type: See Other (303)
- Requested URL:
Categories