> For the complete documentation index, see [llms.txt](https://docs.devhub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devhub.com/hosting-options/cdn-content-delivery-network-support.md).

# CDN (content delivery network) support

### Enabling a CDN URL

Under the Site Settings within the Site Builder you will find a field labeled "Asset URL Prefix".

![](/files/-Lu3Op2YjfdZWkBmVn_A)

You would enter in this field the base URL of the CDN which will be serving the assets without a trailing slash.

**Example Asset URL Prefix:**`https://yoursite.com.somecdn.net`

This would update any .js, .css or image assets so they are served form the CDN instead of locally from the hosted Site.

`https://yoursite.com.somecdn.net/stat/js/some-file.js`

## Linking to assets

If you need to link to an asset from our platform from within your theme or template, you can use the following template code `{% asset %}` to add that to your page which will automatically handle the CDN references.

```markup
<link rel="stylesheet" type="text/css" href="{% asset 'less/backend.css' %}">
```

## Asset macro

Sometimes the assets can't be included using the jinja above, so you also have access to the asset prefix as a macro.

```markup
<img src="${asset_url_prefix}/path/goes/here.png">
```

## Within templates

When using jinja templates, you can also access this value under the site object

```markup
<img src="{{ site.asset_url_prefix }}/path/goes/here.png">
```
