---
title: Using Vercel as a Standalone CDN
description: Use Vercel's external rewrites to proxy and cache content from external websites or APIs through Vercel's global edge network.
url: "https://vercel.com/kb/guide/using_vercel_as_a_cdn"
published: 2025-11-03
last_updated: 2026-07-16
authors: Jason Wiker
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

## Why Use Vercel as a Standalone CDN

Vercel's external rewrites let you proxy and cache content from external websites or APIs through their global edge network, [providing up to 60% latency reduction, 97% connection reuse](https://vercel.com/changelog/faster-cdn-proxying-to-external-origins) to reduce origin load, and global edge caching. You can manage your CDN configuration as code with `vercel.json` and easily rollback changes through deployment history, and leverage Vercel's firewall protection across all your properties—all without requiring any code changes on your origin server.

## Basic Setup

Before getting started, find an existing Vercel Project or [create a Vercel Project](https://vercel.com/docs/getting-started-with-vercel) to define your CDN configuration in. With a Vercel Project, you'll be able to set up [Firewall rules](https://vercel.com/docs/vercel-firewall), view information in the Vercel Dashboard, and [test](https://vercel.com/docs/deployments/environments#preview-environment-pre-production) before the CDN changes roll out to production.

### Step 1: Configure Routing

Create a `vercel.json` file with rewrites to proxy requests:

```json
{
  "rewrites": [
    {
      "source": "/:path*",
      "destination": "https://your-external-site.com/:path*"
    }
  ]
}
```

### Step 2: Enable Caching

For detailed caching options, see the [Edge Cache documentation](https://vercel.com/docs/edge-cache).

#### Option 1: Respect Origin Cache Headers

Use to respect the origin's `Cache-Control`:

```json
{
  "headers": [
    {
      "source": "/:path*",
      "headers": [
        {
          "key": "x-vercel-enable-rewrite-caching",
          "value": "1"
        }
      ]
    }
  ]
}
```

#### Option 2: Origin Headers (Recommended)

Add to your external API responses:

`CDN-Cache-Control: max-age=3600`

#### Option 3: Vercel Config

```json
{
  "rewrites": [
    {
      "source": "/:path*",
      "destination": "https://your-external-site.com/:path*"
    }
  ],
  "headers": [
    {
      "source": "/:path*",
      "headers": [
        {
          "key": "CDN-Cache-Control",
          "value": "max-age=3600"
        }
      ]
    }
  ]
}
```

### Step 3: Configure the domain

Once configured and tested, [connect your domain](https://vercel.com/docs/domains/working-with-domains/add-a-domain) to the Vercel project to start serving traffic proxied through Vercel. Now you can configure additional [Firewall rules](https://vercel.com/docs/vercel-firewall) or look at [Observability](https://vercel.com/docs/observability) for your traffic.

### Step 4: Test before releasing to production

Vercel allows you to modify your CDN configuration and test changes in [Preview](https://vercel.com/docs/deployments/environments#preview-environment-pre-production) before they ever are released to production. When making a change to your CDN configuration, open up the Vercel Dashboard, find the Preview deployment, and use the unique URL to make sure that the changes work before promoting the changes.

## Common Patterns

**API Proxy:**

You can use [rewrites](https://vercel.com/docs/rewrites) to serve your API workload on the same domain as your UI while hosting the API workload in a different location than your UI.

```json
{
  "rewrites": [
    {
      "source": "/api/:path*",
      "destination": "https://api.backend.com/:path*"
    }
  ]
}
```

**Multiple Origins:**

Vercel's CDN can be configured to proxy requests to multiple origins in a single configuration. This is useful for consolidating rules in a single place.

```json
{
  "rewrites": [
    {
      "source": "/api/:path*",
      "destination": "https://api.backend.com/:path*"
    },
    {
      "source": "/:path*",
      "destination": "https://main-site.com/:path*"
    }
  ]
}
```

## Learn More

Learn more by visiting the [Vercel CDN documentation](https://vercel.com/docs/edge-network).

## More Vercel CDN guides

- [How to revalidate Sitecore pages on publish with Next.js](/kb/guide/update-sitecore-content-manually): Learn how to use a Sitecore Experience Edge webhook and Next.js revalidatePath to refresh cached Sitecore Content SDK pages after each publish.
- [How to reduce Vercel Image Optimization costs](/kb/guide/reduce-image-optimization-costs-on-vercel): Learn how to reduce Vercel Image Optimization costs in Next.js by tuning cache TTLs, image sizes, formats, and quality. Diagnose high image transformation count and verify savings using the Vercel Dashboard.
- [Can I use a proxy on top of my Vercel Deployment?](/kb/guide/can-i-use-a-proxy-on-top-of-my-vercel-deployment): General information about using an external proxy to serve a Vercel Deployment.