Set up a custom CDN
To configure Content Hub, you must either be a superuser or have the necessary permissions granted to you through user group policies.
A content delivery network (CDN) is a collection of servers that are strategically distributed across various locations to ensure internet content is delivered fast and efficiently. Content Hub provides a CDN solution with advanced capabilities. You can, however, implement a custom CDN if you have your own domain and domain name system (DNS) and use it to create customized public links.
Sitecore-owned DNS domains are fixed. If you need a specific naming convention, set up a custom DNS using your own domain.
Customized public links have URLs based on the configuration of your domain name system (DNS), for example:
https://customer.example.com/api/public/content/1b59e0697fec48e087c9d922c6487d41?v=a8b381a2
Public links for portal resources are unaffected by this, meaning that if an incorrect CDN URL is provided, or if the specified CDN malfunctions, Content Hub keeps functioning.
A custom CDN solution that is configured to cache assets regardless of the URL structure or file extension can cause a CDN caching behavior that results in discrepancies in asset updates. The setup and configuration settings of a custom CDN as well as responsibility for routing traffic to the default delivery endpoint, in this case, origin <tenant-name>.sitecorecontenthub.cloud, is the responsibility of the customer and outside the scope of Sitecore's responsibilities.
To set up a custom CDN:
-
Set up your CDN to point to your Content Hub solution.
-
Replace the base URL of an existing public link with your CDN URL. For example,
https://mycontenthub.com/api/public/content/abc?v=123becomeshttps://cdn.custom.example/api/public/content/abc?v=123.NoteIf the link works, your CDN configuration is correct and you can perform the following steps. If the link does not work, check your CDN configuration.
-
On the Content Hub menu bar, click Manage
. -
On the Manage page, click Settings.
-
Click the
CustomCdnConfigurationsetting. -
In the public_link_cdn_url field, enter the absolute domain of the custom CDN URL, such as
https://cdn.custom.example. -
Optionally, to remove a custom CDN, delete the URL from the public_link_cdn_url field.
-
Click Save.
-
After configuration, check whether:
-
The assets are cached. If an asset URL does not include a version parameter, it might not be refreshed after it is cached. This can lead to outdated content being served until the cache expires or is manually purged. You can inspect the response header for the
x-cachesetting. If it returnsTCP_MISS, the asset was fetched from the origin. If it returns TCP_HIT, the asset was served from the cache. -
The URL includes an extension. If it doesn't, the asset can only be cached on the worker's side and not on the Experience Edge side. This means that in some cases, even without changing or including the version parameter (v), the asset might instantly be refreshed due to specific worker-level cache behaviors.
-
When you use a custom CDN, your IP address might not be added to the reporting log when you open a public link.