---
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: /kb/guide/using_vercel_as_a_cdn
canonical_url: "https://vercel.com/kb/guide/using_vercel_as_a_cdn"
published: 2025-11-03
last_updated: 2026-07-16
authors: Jason Wiker
related:
  - /changelog/faster-cdn-proxying-to-external-origins
  - /docs/getting-started-with-vercel
  - /docs/vercel-firewall
  - /docs/deployments/environments
  - /docs/edge-cache
  - /docs/domains/working-with-domains/add-a-domain
  - /docs/observability
  - /docs/rewrites
  - /docs/edge-network
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Overview](https://vercel.com/docs/cdn?from=related) — Vercel's CDN is a globally distributed platform that handles routing, caching, security, and compression for every deplo
- [How Vercel CDN works](https://vercel.com/docs/how-vercel-cdn-works?from=related) — Learn how Vercel's CDN processes requests through routing, caching, and compute layers to deliver your content with low
- [Reverse Proxy Servers and Vercel](https://vercel.com/docs/security/reverse-proxy?from=related) — Learn why reverse proxy servers are not recommended with Vercel's firewall.
- [Routing](https://vercel.com/docs/routing?from=related) — Learn how Vercel's CDN routes requests through firewall, project routes, and deployment routes before reaching your appl
- [Rewrites](https://vercel.com/docs/routing/rewrites?from=related) — Learn how to use rewrites to send users to different URLs without modifying the visible URL.
- [Can I use Vercel as a reverse proxy?](https://vercel.com/kb/guide/vercel-reverse-proxy-rewrites-external?from=related) — Learn how to use rewrites to proxy requests from Vercel to other deployments.
- [How to troubleshoot stale content returned from the Edge Network when using an external proxy or CDN](https://vercel.com/kb/guide/how-to-troubleshoot-stale-content-returned-from-the-edge-network-when-using-an-external-proxy-or-cdn?from=related) — Learn how to diagnose and fix stale content issues when using external proxies or CDNs with Vercel. Understand troublesh
- [Manage cache tags for external origins](https://vercel.com/kb/guide/how-to-manage-cache-tags-for-external-origins?from=related) — Learn how to use cache tags to optimally serve fresh content on Vercel when content from your external origin changes
- [Should I use Cloudflare in front of Vercel?](https://vercel.com/kb/guide/cloudflare-with-vercel?from=related) — Information on using Cloudflare together with Vercel.
- [How can I serve multiple projects under a single domain?](https://vercel.com/kb/guide/how-can-i-serve-multiple-projects-under-a-single-domain?from=related) — Learn how to serve multiple Vercel projects from a single domain.

Full cross-link map for this page: [/kb/guide/using_vercel_as_a_cdn.graph.md](/kb/guide/using_vercel_as_a_cdn.graph.md)
<!-- /docsgraph:related -->


## 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).