# Use a CDN for your static assets in Remix

Used: @remix-run/dev@2.0.0

Let's say you're deploying your Remix app somewhere, and you want to upload your public folder to some CDN that will work under `assets.company.com`, while your app runs on `www.company.com`.

We can tell Remix that every link to your public files (JS files, images, fonts, CSS, etc.) will be loaded from that URL by using the `publicPath` option in the `remix.config.mjs`.

```ts {% path="remix.config.mjs" %}
/** @type {import('@remix-run/dev').AppConfig} */
export default {
  publicPath: getPublicPath(),
  // other options
};

function getPublicPath() {
  let defaultCDN = "https://assets.company.com";
  let isCI = process.env.CI || false;
  if (!isCI) return "/build/";
  return `${defaultCDN}/build/`;
}
```

With this, when we run `remix build` in a CI process it will use the path `https://assets.company.com/build/` for every public file our app links to, and locally it will just use `/build/`.
