Iframely as URL shortener

Iframely can act as a URL shortener. Quite a unique one.

For your URL, we will give you a short URL that you can use as permanent source for the smart iFrame. Without the need to periodically re-cache embeds data.

<iframe src="//iframe.ly/ABC" ...></iframe>

If not used in an iframe, the short URLs will just act as the regular link shortener, re-directing user to original URL.

URL shortener requires subscription plan plan that includes it.

Use URL shortener

To activate URL shortener, you just add &iframe=true to your API request either in oEmbed or Iframely formats. If your plan supports short URLs, the API response will have the short URLs in there.

It adds field id to the API responses and also replaces the html embed codes with the ones pointing to the short links.

Short URL will be generated with Iframely also generates a smart iFrames, depending on your your API settings or request parameters.

How short URLs work in an iframe

Short URLs are available under both HTTP and HTTPs.

When used as the source of the iframe, short URLs will instantly fire onload event of the iframe, so that your main page loads and renders fast. Short iframe will then render the embeds content. If possible, it'll be just the re-direct to the original iframe of the publisher (say, YouTube videos).

If user is, say, on iPad, and we only have Flash player, the short URL will fall back to a summary card. Similar fallback occurs when short URL loads via HTTPs and Iframely has only non-SSL embeds.

Iframely can also generate summary cards even for URLs that do not have native embed codes. E.g. for articles and general links. See some samples here. You will have to enable this in your API Settings though.

If called directly, not in an iframe, short URLs will just re-direct user to the source URL.

However, there's a twist. When people share the short URLs in other apps that support oEmbed, Twitter Cards or Open Graph discovery, short URLs will deliver this meta to the app. For instance, Twitter shows the players that Iframely detects.

If you have id of the short URL, your repeat API calls may go to:

These API calls do not require api_key and are publicly available. The calls to it do not apply to your API limits.

You may add similar get parameters to such anonymous calls. Except iframe=true which is always considered as given for API permalinks.

Custom domains + Twitter & Facebook

Short URLs are optimized for Twitter and Facebook and will have rich media attached to it and show on those platforms. It is particularly powereful, when used in combination with Promo API.

To use short URLs with your custom domain, simply:

  • Configure CNAME in your DNS settings to point to iframe.ly
  • Use id field from API responses and generate the short link with your domain in it

Custom domains will only work with HTTP as we don't have your SSL certificate. No worries: accompanying embed codes will still point to iframe.ly domain and will support SSL alright.