This article covers a Bloomreach Experience Manager version 11. There's an updated version available that covers our most recent release.


Serving Gallery items, Assets, Webfiles and static webapp files from a CDN

When serving many binaries like gallery items and assets, webfiles or static webapp files, or when you have large binaries which consume too much bandwidth, or when you want to reduce latency for serving binaries, you might want to choose to serve them from a Content Delivery Network (CDN). 

Serving files from a CDN is very easy to achieve with the CMS 10, and  per  hst:virtualhost you can configure which CDN host you'd like to use. It is also possible to change it in a running production environment. 


On a hst:virtualhost node below /hst:hst in the repository, you can add a new String property :


The property if configured is inherited by child virtualhost nodes, unless configured explicitly on a child node. To remove cdn host on a child node, you have to add hst:cdnhost property and keep the value empty.

The supported cdn host format is:


For example suppose you want binaries to be served from, then you need to configure:

hst:cdnhost = //

other formats like // or // are also allowed. As of version 12.6.1, scheme prefixes such as http or https are supported although not recommended.

Example : serve for production hosts the files from a cdn

+ hst:hosts
  + dev-env               [hst:virtualhostgroup]
    + localhost           [hst:virtualhost]
  + acct-env              [hst:virtualhostgroup]
    + com                 [hst:virtualhost]
      + example           [hst:virtualhost]
         + acct           [hst:virtualhost]
      + example2          [hst:virtualhost]
         + acct           [hst:virtualhost]
  + prod-env              [hst:virtualhostgroup]
    + com                 [hst:virtualhost]
      - hst:cdnhost = //
      + example           [hst:virtualhost]
         + www            [hst:virtualhost]
      + example2          [hst:virtualhost]
         + www            [hst:virtualhost]

in the above example, gallery items, assets, webfiles and static webapp resources for domain and will be loaded from

Technical : Why should a cdn start with // 

From RFC3986 chapter 5.4.1 you can read:

Within a representation with a well defined base URI of


a relative reference is transformed to its target URI as follows.

RFC 3986                   URI Generic Syntax               January 2005
5.4.1.  Normal Examples

      "g:h"           =  "g:h"
      "g"             =  "http://a/b/c/g"
      "./g"           =  "http://a/b/c/g"
      "g/"            =  "http://a/b/c/g/"
      "/g"            =  "http://a/g"
      "//g"           =  "http://g"
      "?y"            =  "http://a/b/c/d;p?y"
      "g?y"           =  "http://a/b/c/g?y"
      "#s"            =  "http://a/b/c/d;p?q#s"
      "g#s"           =  "http://a/b/c/g#s"
      "g?y#s"         =  "http://a/b/c/g?y#s"
      ";x"            =  "http://a/b/c/;x"
      "g;x"           =  "http://a/b/c/g;x"
      "g;x?y#s"       =  "http://a/b/c/g;x?y#s"
      ""              =  "http://a/b/c/d;p?q"
      "."             =  "http://a/b/c/"
      "./"            =  "http://a/b/c/"
      ".."            =  "http://a/b/"
      "../"           =  "http://a/b/"
      "../g"          =  "http://a/b/g"
      "../.."         =  "http://a/"
      "../../"        =  "http://a/"
      "../../g"       =  "http://a/g"

Example 6 is the relevant one: 

//g  =  http://g

The advantage with // is that it follows the scheme ( http or https) of the request that created the html in which references to binary files are added that need to be loaded from a CDN. This way, in the above example, when accessing, all files are served from and when accessing, or files are served from

CMS 7.9 used the  binaries.prefix.path to configure a CDN for gallery items and assets. This property usage has been replaced with the described configuration above. For upgrading from CMS 7.9, you are required to change it. See CMS 7.9 Serving Binaries from a CDN.
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close