---
title: Can I use Vercel as a reverse proxy?
description: Learn how to use rewrites to proxy requests from Vercel to other deployments.
url: /kb/guide/vercel-reverse-proxy-rewrites-external
canonical_url: "https://vercel.com/kb/guide/vercel-reverse-proxy-rewrites-external"
published: 2025-11-03
last_updated: 2026-07-16
authors: Lee Robinson
related:
  - /docs/routing/rewrites
  - /docs/cdn
  - /docs/caching
  - /docs/vercel-firewall
  - /docs/frameworks
  - /docs/routing/project-routing-rules
  - /docs/cli/routes
  - /docs/rest-api/project-routes/add-a-routing-rule
  - /docs/rest-api/sdk/project-routes/add-a-routing-rule
  - /docs/project-configuration/vercel-json
  - /docs/incremental-migration
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.

- [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
- [Redirects](https://vercel.com/docs/routing/redirects?from=related) — Learn how to use redirects on Vercel to instruct Vercel's platform to redirect incoming requests to a new URL.
- [Configuration Redirects](https://vercel.com/docs/routing/redirects/configuration-redirects?from=related) — Learn how to define static redirects in your framework configuration or vercel.json with support for wildcards, pattern
- [Routing](https://vercel.com/docs/services/routing?from=related) — Learn how Vercel routes public requests to services and how each service handles its own routes.
- [Using Vercel as a Standalone CDN](https://vercel.com/kb/guide/using_vercel_as_a_cdn?from=related) — Use Vercel's external rewrites to proxy and cache content from external websites or APIs through Vercel's global edge ne
- [Can I use a proxy on top of my Vercel Deployment?](https://vercel.com/kb/guide/can-i-use-a-proxy-on-top-of-my-vercel-deployment?from=related) — General information about using an external proxy to serve a Vercel Deployment.
- [How can I increase the limit of redirects or use dynamic redirects on Vercel?](https://vercel.com/kb/guide/how-can-i-increase-the-limit-of-redirects-or-use-dynamic-redirects-on-vercel?from=related) — Instructions on how to use Serverless Functions to handle redirects on Vercel.
- [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.
- [Can I redirect from a subdomain to a subpath?](https://vercel.com/kb/guide/can-i-redirect-from-a-subdomain-to-a-subpath?from=related) — Learn how to redirect from your subdomain to a subpath on Vercel with a vercel.json file or with Next.js

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


Vercel offers native support for using a reverse proxy through [rewrites](https://vercel.com/docs/routing/rewrites). This guide will show how to set up rewrites to proxy requests to external origins, commonly used as part of an incremental migration to Vercel.

Proxying puts the [Vercel CDN](https://vercel.com/docs/cdn) in front of your backend, improving performance through Vercel's global network and reducing cost with [built-in caching](https://vercel.com/docs/caching). It also adds a layer of security with the [Vercel Firewall](https://vercel.com/docs/vercel-firewall).

## Reverse proxying with rewrites

[Rewrites](https://vercel.com/docs/routing/rewrites) allow you to send users to different URLs without modifying the visible URL. They allow you to change the URL path, query parameters, and headers of the request before it reaches your server.

You can also use them to return different responses depending on the headers of the incoming request (such as `User-Agent`, which contains the type of device and browser that the request originated from).

## Using Vercel rewrites to reverse proxy

Vercel supports [many different frameworks](https://vercel.com/docs/frameworks) which have native support for reverse proxying. For example, with [Next.js](http://nextjs.org/):

```javascript
module.exports = {
  async rewrites() {
    return [
      {
        source: '/blog',
        destination: 'https://acme.com/blog',
      },
    ]
  },
}
```

If your framework does not support rewrites, you can also define rules in a `vercel.json` file located in the root of your application. This enables you to reverse proxy any project.

```json
{
  "rewrites": [
    {
      "source": "/blog",
      "destination": "https://acme.com/blog"
    }
  ]
}
```

## Using project-level routing rules

You can also configure reverse proxying without modifying code using [project-level routing rules](https://vercel.com/docs/routing/project-routing-rules).

These rules are applied at the CDN layer and take effect immediately without redeployment.

To create a rewrite rule with the [Vercel CLI](https://vercel.com/docs/cli/routes), run the following commands:

```bash
vercel routes add "Blog Proxy" \
  --src "/blog" \
  --src-syntax path-to-regexp \
  --action rewrite \
  --dest "https://acme.com/blog" \
  --yes

vercel routes publish --yes
```

Project-level routing rules can also be configured through the [Vercel Dashboard](https://vercel.com/d?to=%2F%5Bteam%5D%2F%5Bproject%5D%2Fcdn%2Frouting), [REST API](https://vercel.com/docs/rest-api/project-routes/add-a-routing-rule), or [SDK](https://vercel.com/docs/rest-api/sdk/project-routes/add-a-routing-rule).

## Learn more

Review the following links for more advanced use cases:

- [Rewrites on Vercel](https://vercel.com/docs/routing/rewrites)
  
- [Rewrites with vercel.json](https://vercel.com/docs/project-configuration/vercel-json#rewrites)
  
- [Incremental Migration Guide](https://vercel.com/docs/incremental-migration)