Bring your own CDN
Brandfolder has the capability to support any CDN provider through the creation of a new distribution in your current CDN provider and pointing it to Brandfolder's CDN origin domain.
This is not a native feature to Brandfolder but rather is something that you will need to set up and configure for your own account. If you choose to bring your own CDN you will also need the Brandfolder Smart CDN feature along with some amount of Brandfolder CDN bandwidth.
This article will walk you through configuration using Amazon CloudFront. As mentioned previously, any CDN provider can be set up with similar methods.
1. Select create distribution.
2. Designate your origin info as the following:
- Origin domain: cdn.bfldr.com
- HTTPS only
- HTTPS port: 443
- Minimum origin SSL protocol: TLSv1.1
- Origin path: leave blank
- Origin name: Any name of your choice, for example, Custom-CDN.bfldr.com
- Enable origin shield: Yes
- Origin shield region: Choose a region that makes the most sense for your usag
3. Setup your default cache behavior as the following:
- Compress objects automatically: Your choice, we chose yes
- Viewer protocol policy: Redirect HTTP to HTTPS
- Allowed HTTP methods: GET, HEAD
- Restrict viewer access: No
4. Establish your cache key origin requests as:
- Legacy cache settings
- Headers: None
- Query strings: All (this is important for image transformation functions)
- Cookies: none
- Object caching: customize
- Minimum TTL: 86400 (1 day, we would recommend 1 day at minimum or as long as 1 week depending on your content workflows)
- Maximum TTL: 86400
- Default TTL: 86400
- In this case, we are forcing everything to one day, but this is up to you.
5. Enable the following settings:
- Price class: Use all edge locations (best performance)
- AWS WAF web ACL: blank
- Alternate domain name (CNAME): Choose the domain or subdomain you would like to use. In our case, we are using yourcustomcdn.brandfolder.com
- Custom SSL certificate: Select the certificate for the domain you want to use, if you do not have one, request a certificate from the AWS console.
6. The final pieces that need to be selected include:
- Supported HTTP versions: HTTP/2
- Standard logging: off
- IPv6: On
Once all of this information is inputted, select Create Distribution.
Then you will need to point the alternate domain name to this distribution.
Create a CNAME record and point that cname to the CloudFront distribution. You can find that value by going to Cloudfront, clicking on your distribution, then finding the “distribution domain name”.
7. Test out your new Brandfolder custom CDN.
Any CDN provider is supported.
Image management functions still work as usual.
Logging of the pages your image lives on will not work within the Brandfolder platform. We utilize CDN logs for this, and since you are bringing your own CDN we do not have access to those logs.
Invalidations: Brandfolder will automatically invalidate CDN objects when updated when using the Brandfolder hosted CDN. If you bring your own CDN, that invalidation does not occur automatically. This is why you should set your caching TTL to a timeframe that makes sense for your use case.
If you do wish to invalidate updates, you can use the Brandfolder API Webhooks to do this on your own.