Get iFrames via your own CDN
You can have Iframely smart iFrames served via your own content delivery network. Say, Amazon CloudFront, CloudFlare or any other.
To have it configured, point your CDN distribution to our servers and give the address of the distribution to our support team. We will verify your setup and add your CDN to your account.
After that, Iframely will start returning embed codes with your own CDN proxy that fetches white-labeled iFrames from our cloud and delivers it to your users.
Configure Amazon CloudFront
Create a new CloudFront distribution. For it, configure the following general settings that are required by Iframely:
- Delivery method: "web".
- Origin domain name: "iframe.ly".
- Origin path: leave empty.
- Forward headers: "whitelist", add header "CloudFront-Forwarded-Proto" as otherwise we won't be able to tell if the request comes via SSL or not.
- Object caching: "use origin cache headers".
- Forward Query Strings: "yes".
- All the other fields can be left with default values.
Basically, you're mapping to the root of the domain, and let Iframely orchestrate the CloudFront cache. You may create custom CNAME if you like, but don't forget to get a custom SSL certificate from Amazon in that case as well. It might be easier to just use the default *.cloudfront.com domain name.
You can either create a subdomain for your existing CloudFlare site, or register a custom rool-level domain and add it to CloudFlare separetly.
- In DNS, create subdomain as the "CNAME" record and point it to "iframe.ly". You can safely use CNAME Flattening setting to make DNS resolution a bit faster for your users
In Page Rules, create a rule for "yourcdn.yourdomain.com/*" (use your own domain) and add two settings:
- "Cache Level: Cache Everything" - it makes CloudFlare cache text/html resources too. Cache TTL will depend on your CloudFlare plan.
- "SSL level: Full" - Iframely needs to know that requests are being made over SSL.
In Caching, set Caching Level to Standard as Iframely needs the query strings. If you need other values elsewhere on your domain, then you can't set CDN as subdomain. You will have to register a separate domain for your CDN with Iframely, as our iFrames won't work without query strings.
Don't forget to activate SSL in Crypto section, if you need HTTPs connections.
Contact us to finalize
Once you've configured your CDN, send us your CDN domain name. We will verify that everything is right and configure it as domain name for your smart iFrames.