---
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"
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
---

## 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:

`{ "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`:

`{ "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 `{ "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.

`{ "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. `{ "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).