Using a Custom CDN Host

Using a Custom CDN Host

The Web Interface Builder serves binary data (such as images or PDF files) through a global content delivery network (CDN), which ensures that the data is made available at high speed, regardless of the user’s location. The domain name of any Interface Builder CDN URL is scrvt.com.

If you prefer to use your own domain for content delivery, you can configure it in your Dashboard. Open the details page of your website, switch to the “Settings” tab, scroll down, and enter the “Danger Zone”.

The “Custom CDN Host” option lets you specify your own domain for binary data delivery. The blobs of your Interface Builder instance must be reachable at the root path of your CDN domain. The Dashboard will check this, and present you with an error if it fails to reach the content of your instance via the specified host.

You can make the content of your instance available via your own domain by means of a proxy server, or through a CDN provider, e.g. AWS CloudFront, that uses the Interface Builder’s CDN as its source.

Using an AWS CloudFront Distribution as the CDN

To use an AWS CloudFront distribution with a custom domain, you will need to provide a suitable certificate via AWS Certificate Manager (ACM).

  1. In your AWS CloudFront console, switch to the “Policy” section and create
    • a cache policy including the Accept header and all query strings in cache keys, and
    • an origin request policy, including the Accept header and all query strings in the origin request settings.
  2. Switch to the distributions and create a new CloudFront distribution.
  3. Set the “Origin Domain Name” to cdn.scrvt.com and the “Origin Path” to / followed by the ID of your instance. Also, change the “Origin Protocol Policy” to HTTPS Only.
  4. When configuring the default cache behavior, select the cache and origin request policy you created before.
  5. Add your CDN domain name to the “Alternate Domain Names” and select the corresponding “SSL Certificate”.
  6. After creating the CloudFront distribution and waiting for its deployment to complete, configure the DNS for your domain so that it uses the CloudFront domain displayed on the details page of your distribution.

You are now ready to specify your CDN domain as the “Custom CDN Host” of your Interface Builder instance in your Dashboard.