[Skip to content](/content/docs/project-configuration/vercel-json#geist-skip-nav/index.html)

[Project Configuration](/content/docs/project-configuration/index.html)

vercel.json

Copy pageCopy page

On this page

# Static Configuration with vercel.json

Copy pageCopy page

The `vercel.json` file lets you configure, and override the default behavior of Vercel from within your project.

This file should be created in your project's root directory and allows you to set:

- [schema autocomplete](/content/docs/project-configuration/vercel-json#schema-autocomplete/index.html)
- [buildCommand](/content/docs/project-configuration/vercel-json#buildcommand/index.html)
- [bunVersion](/content/docs/project-configuration/vercel-json#bunversion/index.html)
- [cleanUrls](/content/docs/project-configuration/vercel-json#cleanurls/index.html)
- [crons](/content/docs/project-configuration/vercel-json#crons/index.html)
- [devCommand](/content/docs/project-configuration/vercel-json#devcommand/index.html)
- [fluid](/content/docs/project-configuration/vercel-json#fluid/index.html)
- [framework](/content/docs/project-configuration/vercel-json#framework/index.html)
- [functions](/content/docs/project-configuration/vercel-json#functions/index.html)
- [headers](/content/docs/project-configuration/vercel-json#headers/index.html)
- [ignoreCommand](/content/docs/project-configuration/vercel-json#ignorecommand/index.html)
- [images](/content/docs/project-configuration/vercel-json#images/index.html)
- [installCommand](/content/docs/project-configuration/vercel-json#installcommand/index.html)
- [outputDirectory](/content/docs/project-configuration/vercel-json#outputdirectory/index.html)
- [proxy](/content/docs/project-configuration/vercel-json#proxy/index.html)
- [redirects](/content/docs/project-configuration/vercel-json#redirects/index.html)
- [bulkRedirectsPath](/content/docs/project-configuration/vercel-json#bulkredirectspath/index.html)
- [regions](/content/docs/project-configuration/vercel-json#regions/index.html)
- [functionFailoverRegions](/content/docs/project-configuration/vercel-json#functionfailoverregions/index.html)
- [rewrites](/content/docs/project-configuration/vercel-json#rewrites/index.html)
- [routes](/content/docs/project-configuration/vercel-json#routes/index.html)
- [trailingSlash](/content/docs/project-configuration/vercel-json#trailingslash/index.html)

## [schema autocomplete](/content/docs/project-configuration/vercel-json\#schema-autocomplete/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#schema-autocomplete/index.html)

To add autocompletion, type checking, and schema validation to your `vercel.json` file, add the following to the top of your file:

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json"
}
```

## [buildCommand](/content/docs/project-configuration/vercel-json\#buildcommand/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#buildcommand/index.html)

Type:`string | null`

The `buildCommand` property can be used to override the Build Command in the Project Settings dashboard, and the `build` script from the `package.json` file for a given deployment. For more information on the default behavior of the Build Command, visit the [Configure a Build - Build Command](/content/docs/builds/configure-a-build#build-command/index.html) section.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "buildCommand": "next build"
}
```

This value overrides the [Build Command](/content/docs/builds/configure-a-build#build-command/index.html) in Project Settings.

## [bunVersion](/content/docs/project-configuration/vercel-json\#bunversion/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#bunversion/index.html)

The Bun runtimeis available in [Beta](/content/docs/release-phases#beta/index.html)on [all plans](/content/docs/plans/index.html)

Type:`string`

Value:`"1.4.x" | "1.x"`

The `bunVersion` property configures your project to use the Bun runtime instead of Node.js. When set, all [Vercel Functions](/content/docs/functions/index.html) and [Routing Middleware](/content/docs/routing-middleware/index.html) not using the [Edge runtime](/content/docs/functions/runtimes/edge/index.html) will run using the specified Bun version.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "bunVersion": "1.4.x"
}
```

Vercel manages the Bun minor versions automatically. `1.4.x` and `1.x` are the
only valid values currently.

When using Next.js with [ISR](/content/docs/incremental-static-regeneration/index.html) (Incremental Static Regeneration), you must also update your `build` and `dev` commands in `package.json`:

package.json

```
{
  "scripts": {
    "dev": "bun run --bun next dev",
    "build": "bun run --bun next build"
  }
}
```

To learn more about using Bun with Vercel Functions, see the [Bun runtime documentation](/content/docs/functions/runtimes/bun/index.html).

## [cleanUrls](/content/docs/project-configuration/vercel-json\#cleanurls/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#cleanurls/index.html)

Type: `Boolean`.

Default Value: `false`.

When set to `true`, all HTML files and Vercel functions will have their extension removed. When visiting a path that ends with the extension, a 308 response will redirect the client to the extensionless path.

For example, a static file named `about.html` will be served when visiting the `/about` path. Visiting `/about.html` will redirect to `/about`.

Similarly, a Vercel Function named `api/user.go` will be served when visiting `/api/user`. Visiting `/api/user.go` will redirect to `/api/user`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "cleanUrls": true
}
```

If you are using Next.js and running `vercel dev`, you will get a 404 error when visiting a route configured with `cleanUrls` locally. It does however work fine when deployed to Vercel. In the example above, visiting `/about` locally will give you a 404 with `vercel dev` but `/about` will render correctly on Vercel.

## [crons](/content/docs/project-configuration/vercel-json\#crons/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#crons/index.html)

Used to configure [cron jobs](/content/docs/cron-jobs/index.html) for the production deployment of a project.

Type: `Array` of cron `Object`.

Limits:

- A maximum of string length of 512 for the `path` value.
- A maximum of string length of 256 for the `schedule` value.

### [Cron object definition](/content/docs/project-configuration/vercel-json\#cron-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#cron-object-definition/index.html)

- `path` \- Required \- The path to invoke when the cron job is triggered. Must start with `/`.
- `schedule` \- Required \- The [cron schedule expression](/content/docs/cron-jobs#cron-expressions/index.html) to use for the cron job.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "crons": [\
    {\
      "path": "/api/every-minute",\
      "schedule": "* * * * *"\
    },\
    {\
      "path": "/api/every-hour",\
      "schedule": "0 * * * *"\
    },\
    {\
      "path": "/api/every-day",\
      "schedule": "0 0 * * *"\
    }\
  ]
}
```

## [devCommand](/content/docs/project-configuration/vercel-json\#devcommand/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#devcommand/index.html)

This value overrides the [Development Command](/content/docs/builds/configure-a-build#development-command/index.html) in Project Settings.

Type:`string | null`

The `devCommand` property can be used to override the Development Command in the Project Settings dashboard. For more information on the default behavior of the Development Command, visit the [Configure a Build - Development Command](/content/docs/builds/configure-a-build#development-command/index.html) section.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "devCommand": "next dev"
}
```

## [fluid](/content/docs/project-configuration/vercel-json\#fluid/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#fluid/index.html)

This value allows you to enable [Fluid compute](/content/docs/fluid-compute/index.html) programmatically.

Type:`boolean | null`

The `fluid` property allows you to test Fluid compute on a per-deployment or per [custom environment](/content/docs/deployments/environments#custom-environments/index.html) basis when using branch tracking, without needing to enable Fluid in production.

As of April 23, 2025, Fluid compute is enabled by default for new projects.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "fluid": true
}
```

## [framework](/content/docs/project-configuration/vercel-json\#framework/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#framework/index.html)

This value overrides the [Framework](/content/docs/builds/configure-a-build#framework-preset/index.html) in Project Settings.

Type:`string | null`

Available framework slugs:

[nextjs](https://nextjs.org/) [nuxtjs](https://nuxt.com/) [svelte](https://svelte.dev/) [create-react-app](https://create-react-app.dev/) [gatsby](https://gatsbyjs.org/) [remix](https://remix.run/) [react-router](https://reactrouter.com/) [solidstart](https://solidjs.com/) [sveltekit](https://kit.svelte.dev/) [container](https://docs.docker.com/reference/dockerfile/) [blitzjs](https://blitzjs.com/) [astro](https://astro.build/) [hexo](https://hexo.io/) [eleventy](https://www.11ty.dev/) [docusaurus-2](https://v2.docusaurus.io/) [docusaurus](https://docusaurus.io/) [preact](https://preactjs.com/) [solidstart-1](https://start.solidjs.com/) [dojo](https://dojo.io/) [ember](https://emberjs.com/) [vue](https://vuejs.org/) [scully](https://github.com/scullyio/scully) [ionic-angular](https://ionicframework.com/) [angular](https://angular.io/) [polymer](https://www.polymer-project.org/) [sveltekit-1](https://kit.svelte.dev/) [ionic-react](https://ionicframework.com/) [gridsome](https://gridsome.org/) [umijs](https://umijs.org/) [sapper](https://sapper.svelte.dev/) [saber](https://saber.egoist.dev/) [stencil](https://stenciljs.com/) [redwoodjs](https://redwoodjs.com/) [hugo](https://gohugo.io/) [jekyll](https://jekyllrb.com/) [brunch](https://brunch.io/) [middleman](https://middlemanapp.com/) [zola](https://www.getzola.org/) [hydrogen](https://hydrogen.shopify.dev/) [vite](https://vitejs.dev/) [tanstack-start](https://tanstack.com/start) [tanstack-start-lovable](https://lovable.dev/) [vitepress](https://vitepress.vuejs.org/) [vuepress](https://vuepress.vuejs.org/) [parcel](https://parceljs.org/) [fastapi](https://fastapi.tiangolo.com/) [flask](https://flask.palletsprojects.com/) [fasthtml](https://fastht.ml/) [django](https://www.djangoproject.com/) factory-eveeve [sanity](https://www.sanity.io/) [sanity-v2](https://www.sanity.io/) [storybook](https://storybook.js.org/) [nitro](https://nitro.build/) [hono](https://hono.dev/) [express](https://expressjs.com/) [h3](https://h3.dev/) [koa](https://koajs.com/) [nestjs](https://nestjs.com/) [elysia](https://elysiajs.com/) [fastify](https://fastify.dev/) [xmcp](https://xmcp.dev/) [python](https://python.org/) [node](https://nodejs.org/) [go](https://go.dev/) [services](/content/site-root.html) [mastra](https://mastra.ai/)

The `framework` property can be used to override the Framework Preset in the Project Settings dashboard. The value must be a valid framework slug. For more information on the default behavior of the Framework Preset, visit the [Configure a Build - Framework Preset](/content/docs/builds/configure-a-build#framework-preset/index.html) section.

To select "Other" as the Framework Preset, use `null`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "framework": "nextjs"
}
```

## [functions](/content/docs/project-configuration/vercel-json\#functions/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#functions/index.html)

Type:`Object` of key `String` and value `Object`.

### [Key definition](/content/docs/project-configuration/vercel-json\#key-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#key-definition/index.html)

A [glob](https://github.com/isaacs/node-glob#glob-primer) pattern that matches the paths of the Vercel functions you would like to customize:

- `api/*.js` (matches one level e.g. `api/hello.js` but not `api/hello/world.js`)
- `api/**/*.ts` (matches all levels `api/hello.ts` and `api/hello/world.ts`)
- `src/pages/**/*` (matches all functions from `src/pages`)
- `api/test.js`

### [Value definition](/content/docs/project-configuration/vercel-json\#value-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#value-definition/index.html)

- `runtime` (optional): The npm package name of a [Runtime](/content/docs/functions/runtimes/index.html), including its version.
- `memory`: Memory cannot be set in `vercel.json` with [Fluid compute](/content/docs/fluid-compute/index.html) enabled. Instead set it in the Functions section in your project dashboard sidebar. See [setting default function memory](/content/docs/functions/configuring-functions/memory#setting-your-default-function-memory-/-cpu-size/index.html) for more information.
- `maxDuration` (optional): How long your Vercel Function can run on each request. Set an integer number of seconds between `1` and your plan's maximum limit. See [max duration](/content/docs/functions/limitations#max-duration/index.html).
- `supportsCancellation` (optional): A boolean defining whether your Vercel Function should [support request cancellation](/content/docs/functions/functions-api-reference#cancel-requests/index.html). This is only available when you're using the Node.js runtime.
- `includeFiles` (optional): A [glob](https://github.com/isaacs/node-glob#glob-primer) pattern to match files that should be included in your Vercel Function. If you’re using a Community Runtime, the behavior might vary. Please consult its documentation for more details. (Not supported in Next.js, instead use [`outputFileTracingIncludes`](https://nextjs.org/docs/app/api-reference/config/next-config-js/output#caveats) in `next.config.js` )
- `excludeFiles` (optional): A [glob](https://github.com/isaacs/node-glob#glob-primer) pattern to match files that should be excluded from your Vercel Function. If you’re using a Community Runtime, the behavior might vary. Please consult its documentation for more details. (Not supported in Next.js, instead use [`outputFileTracingExcludes`](https://nextjs.org/docs/app/api-reference/config/next-config-js/output#caveats) in `next.config.js` )
- `regions` (optional): An array of [region](/content/docs/regions/index.html) identifiers specifying where this specific function should be deployed. This overrides the project-level [`regions`](/content/docs/project-configuration/vercel-json#regions/index.html) setting for the matched functions. See [per-function region configuration](/content/docs/functions/configuring-functions/region#per-function-configuration/index.html) for more details.
- `functionFailoverRegions` (optional): An array of [region](/content/docs/regions/index.html) identifiers specifying passive regions this specific function can fail over to during an outage. This overrides the project-level [`functionFailoverRegions`](/content/docs/project-configuration/vercel-json#functionfailoverregions/index.html) setting for the matched functions. Enterprise only. See [per-function region configuration](/content/docs/functions/configuring-functions/region#per-function-configuration/index.html) for more details.

### [Description](/content/docs/project-configuration/vercel-json\#legacy-description/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#legacy-description/index.html)

By default, no configuration is needed to deploy Vercel functions to Vercel.

For all [officially supported runtimes](/content/docs/functions/runtimes/index.html), the only requirement is to create an `api` directory at the root of your project directory, placing your Vercel functions inside.

The `functions` property cannot be used in combination with `builds`. Since the latter is a legacy configuration property, we recommend dropping it in favor of the new one.

Because [Incremental Static Regeneration (ISR)](/content/docs/incremental-static-regeneration/index.html) uses Vercel functions, the same configurations apply. The ISR route can be defined using a glob pattern, and accepts the same properties as when using Vercel functions.

When deployed, each Vercel Function uses your project's default memory and maximum duration. See [Vercel Functions limits](/content/docs/functions/limitations/index.html) for plan limits and defaults.

With Fluid compute enabled, set memory in the Functions section of your project dashboard, not in `vercel.json`. To override the maximum duration for matched functions, add the `functions` property.

#### [`functions` property with Vercel functions](/content/docs/project-configuration/vercel-json\#functions-property-with-vercel-functions/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#functions-property-with-vercel-functions/index.html)

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "functions": {
    "api/test.js": {
      "maxDuration": 30
    },
    "api/*.js": {
      "maxDuration": 30
    }
  }
}
```

#### [`functions` property with ISR](/content/docs/project-configuration/vercel-json\#functions-property-with-isr/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#functions-property-with-isr/index.html)

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "functions": {
    "pages/blog/[hello].tsx": {
      "maxDuration": 5
    },
    "src/pages/isr/**/*": {
      "maxDuration": 10
    }
  }
}
```

#### [Per-function `regions` and `functionFailoverRegions`](/content/docs/project-configuration/vercel-json\#per-function-regions-and-functionfailoverregions/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#per-function-regions-and-functionfailoverregions/index.html)

You can set `regions` and `functionFailoverRegions` on individual functions to override the project-level defaults. This is useful when different functions need to run in different regions, for example when they access different data sources.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "regions": ["iad1"],
  "functions": {
    "api/eu-data.js": {
      "regions": ["cdg1"],
      "functionFailoverRegions": ["lhr1"]
    },
    "api/us-data.js": {
      "regions": ["sfo1", "iad1"],
      "functionFailoverRegions": ["pdx1"]
    }
  }
}
```

In the example above, `api/eu-data.js` runs in Paris (`cdg1`) with London (`lhr1`) as a failover, while `api/us-data.js` runs in San Francisco (`sfo1`) and Washington, D.C. (`iad1`) with Portland (`pdx1`) as a failover. All other functions use the project-level default of `iad1`.

### [Using unsupported runtimes](/content/docs/project-configuration/vercel-json\#using-unsupported-runtimes/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#using-unsupported-runtimes/index.html)

To use a runtime that is not [officially supported](/content/docs/functions/runtimes/index.html), you can add a `runtime` property to the definition:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "functions": {
    "api/test.php": {
      "runtime": "vercel-php@0.5.2"
    }
  }
}
```

In the example above, the `api/test.php` Vercel Function does not use one of the [officially supported runtimes](/content/docs/functions/runtimes/index.html). In turn, a `runtime` property was added to invoke the [vercel-php](https://www.npmjs.com/package/vercel-php) community runtime.

For more information on Runtimes, see the [Runtimes documentation](/content/docs/functions/runtimes/index.html):

## [headers](/content/docs/project-configuration/vercel-json\#headers/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#headers/index.html)

Type:`Array` of header `Object`.

Valid values: a list of header definitions.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "headers": [\
    {\
      "source": "/service-worker.js",\
      "headers": [\
        {\
          "key": "Cache-Control",\
          "value": "public, max-age=0, must-revalidate"\
        }\
      ]\
    },\
    {\
      "source": "/(.*)",\
      "headers": [\
        {\
          "key": "X-Content-Type-Options",\
          "value": "nosniff"\
        },\
        {\
          "key": "X-Frame-Options",\
          "value": "DENY"\
        },\
        {\
          "key": "X-XSS-Protection",\
          "value": "1; mode=block"\
        }\
      ]\
    },\
    {\
      "source": "/:path*",\
      "has": [\
        {\
          "type": "query",\
          "key": "authorized"\
        }\
      ],\
      "headers": [\
        {\
          "key": "x-authorized",\
          "value": "true"\
        }\
      ]\
    }\
  ]
}
```

This example configures custom response headers for static files, [Vercel functions](/content/docs/functions/index.html), and a wildcard that matches all routes.

### [Header object definition](/content/docs/project-configuration/vercel-json\#header-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#header-object-definition/index.html)

| Property | Description |
| --- | --- |
| `source` | A pattern that matches each incoming pathname (excluding querystring). |
| `headers` | A non-empty array of key/value pairs representing each response header. |
| `has` | An optional array of `has` objects with the `type`, `key` and `value` properties. Used for conditional path matching based on the presence of specified properties. |
| `missing` | An optional array of `missing` objects with the `type`, `key` and `value` properties. Used for conditional path matching based on the absence of specified properties. |

### [Header `has` or `missing` object definition](/content/docs/project-configuration/vercel-json\#header-has-or-missing-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#header-has-or-missing-object-definition/index.html)

| Property | Type | Description |
| --- | --- | --- |
| `type` | `String` | Must be either `header`, `cookie`, `host`, or `query`. The `type` property only applies to request headers sent by clients, not response headers sent by your functions or backends. |
| `key` | `String` | The key from the selected type to match against. For example, if the `type` is `header` and the `key` is `X-Custom-Header`, we will match against the `X-Custom-Header` header key. |
| `value` | `String` or `Object` or `undefined` | The value to check for, if `undefined` any value will match. A regex like string can be used to capture a specific part of the value. For example, if the value `first-(?<paramName>.*)` is used for `first-second` then `second` will be usable in the destination with `:paramName`. If an object is provided, it will match when all conditions are met for its fields below. |

If `value` is an object, it has one or more of the following fields:

| Condition | Type | Description |
| --- | --- | --- |
| `eq` | `String` (optional) | Check for equality |
| `neq` | `String` (optional) | Check for inequality |
| `inc` | `Array<String>` (optional) | Check for inclusion in the array |
| `ninc` | `Array<String>` (optional) | Check for non-inclusion in the array |
| `pre` | `String` (optional) | Check for prefix |
| `suf` | `String` (optional) | Check for suffix |
| `re` | `String` (optional) | Check for a regex match |
| `gt` | `Number` (optional) | Check for greater than |
| `gte` | `Number` (optional) | Check for greater than or equal to |
| `lt` | `Number` (optional) | Check for less than |
| `lte` | `Number` (optional) | Check for less than or equal to |

This example demonstrates using the expressive `value` object to append the header `x-authorized: true` if the `X-Custom-Header` request header's value is prefixed by `valid` and ends with `value`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "headers": [\
    {\
      "source": "/:path*",\
      "has": [\
        {\
          "type": "header",\
          "key": "X-Custom-Header",\
          "value": {\
            "pre": "valid",\
            "suf": "value"\
          }\
        }\
      ],\
      "headers": [\
        {\
          "key": "x-authorized",\
          "value": "true"\
        }\
      ]\
    }\
  ]
}
```

Learn more about [headers](/content/docs/headers/index.html) on Vercel and see [limitations](/content/docs/caching/cdn-cache#limits/index.html).

## [ignoreCommand](/content/docs/project-configuration/vercel-json\#ignorecommand/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#ignorecommand/index.html)

This value overrides the [Ignored Build Step](/content/docs/project-configuration/project-settings#ignored-build-step/index.html) in Project Settings.

Type:`string | null`

This `ignoreCommand` property will override the Command for Ignoring the Build Step for a given deployment. When the command exits with code 1, the build will continue. When the command exits with 0, the build is ignored. For more information on the default behavior of the Ignore Command, visit the [Ignored Build Step](/content/docs/project-configuration/project-settings#ignored-build-step/index.html) section.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "ignoreCommand": "git diff --quiet HEAD^ HEAD ./"
}
```

## [installCommand](/content/docs/project-configuration/vercel-json\#installcommand/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#installcommand/index.html)

This value overrides the [Install Command](/content/docs/builds/configure-a-build#install-command/index.html) in Project Settings.

Type:`string | null`

The `installCommand` property can be used to override the Install Command in the Project Settings dashboard for a given deployment. This setting is useful for trying out a new package manager for the project. An empty string value will cause the Install Command to be skipped. For more information on the default behavior of the install command visit the [Configure a Build - Install Command](/content/docs/builds/configure-a-build#install-command/index.html)
section.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "installCommand": "npm install"
}
```

## [images](/content/docs/project-configuration/vercel-json\#images/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#images/index.html)

The `images` property defines the behavior of [Vercel's native Image Optimization API](/content/docs/image-optimization/index.html), which allows on-demand optimization of images at runtime.

Type: `Object`

### [Value definition](/content/docs/project-configuration/vercel-json\#images-value-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#images-value-definition/index.html)

- `sizes` \- Required \- Array of allowed image widths. The Image Optimization API will return an error if the `w` parameter is not defined in this list.
- `localPatterns` \- Allow-list of local image paths which can be used with the Image Optimization API.
- `remotePatterns` \- Allow-list of external domains which can be used with the Image Optimization API.
- `minimumCacheTTL` \- Cache duration (in seconds) for the optimized images.
- `qualities` \- Array of allowed image qualities. The Image Optimization API will return an error if the `q` parameter is not defined in this list.
- `formats` \- Supported output image formats. Allowed values are either `"image/avif"` and/or `"image/webp"`.
- `dangerouslyAllowSVG` \- Allow SVG input image URLs. This is disabled by default for security purposes.
- `contentSecurityPolicy` \- Specifies the [Content Security Policy](https://developer.mozilla.org/docs/Web/HTTP/CSP) of the optimized images.
- `contentDispositionType` \- Specifies the value of the `"Content-Disposition"` response header. Allowed values are `"inline"` or `"attachment"`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "images": {
    "sizes": [256, 640, 1080, 2048, 3840],
    "localPatterns": [{\
      "pathname": "^/assets/.*$",\
      "search": ""\
    }],
    "remotePatterns": [\
      {\
        "protocol": "https",\
        "hostname": "example.com",\
        "port": "",\
        "pathname": "^/account123/.*$",\
        "search": "?v=1"\
      }\
    ],
    "minimumCacheTTL": 60,
    "qualities": [25, 50, 75],
    "formats": ["image/webp"],
    "dangerouslyAllowSVG": false,
    "contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;",
    "contentDispositionType": "inline"
  }
}
```

## [outputDirectory](/content/docs/project-configuration/vercel-json\#outputdirectory/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#outputdirectory/index.html)

This value overrides the [Output Directory](/content/docs/builds/configure-a-build#output-directory/index.html) in Project Settings.

Type:`string | null`

The `outputDirectory` property can be used to override the Output Directory in the Project Settings dashboard for a given deployment.

In the following example, the deployment will look for the `build` directory rather than the default `public` or `.` root directory. For more information on the default behavior of the Output Directory see the [Configure a Build - Output Directory](/content/docs/builds/configure-a-build#output-directory/index.html) section. The following example is a `vercel.json` file that overrides the `outputDirectory` to `build`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "outputDirectory": "build"
}
```

## [proxy](/content/docs/project-configuration/vercel-json\#proxy/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#proxy/index.html)

Type:`Object`

The `proxy` property can be used to explicitly configure the file Vercel builds as [Routing Middleware](/content/docs/routing-middleware/index.html). Without it, Vercel looks for a `middleware.ts` or `middleware.js` file at your project root.

### [Value definition](/content/docs/project-configuration/vercel-json\#proxy-value-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#proxy-value-definition/index.html)

- `entrypoint` (required): The path to your Routing Middleware file, relative to your project root. Must end in `.js` or `.ts`, must reference an existing file, and can live in a subdirectory such as `src/proxy.ts`.
- `matcher` (optional): A path matcher starting with `/`, or an array of path matchers starting with `/`, that defines which requests run your Routing Middleware. See [matcher config](/content/docs/routing-middleware/api#match-paths-based-on-custom-matcher-config/index.html) for the supported syntax.

### [Description](/content/docs/project-configuration/vercel-json\#description/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#description/index.html)

The following configuration builds `proxy.ts` as your Routing Middleware and runs it on requests under `/api`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "proxy": {
    "entrypoint": "proxy.ts",
    "matcher": "/api/:func*"
  }
}
```

Your entrypoint exports the handler as a default export:

proxy.ts

```
export default function proxy(request: Request) {
  return new Response('Hello from your Routing Middleware!');
}
```

proxy.js

```
export default function proxy(request) {
  return new Response('Hello from your Routing Middleware!');
}
```

### [Runtime](/content/docs/project-configuration/vercel-json\#runtime/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#runtime/index.html)

An entrypoint configured through `proxy` runs on the [Node.js runtime](/content/docs/functions/runtimes/node-js/index.html).

A `middleware.ts` file that sets `runtime: 'nodejs'` in its exported `config` behaves the same as `"proxy": { "entrypoint": "middleware.ts" }`.

### [Setting the matcher](/content/docs/project-configuration/vercel-json\#setting-the-matcher/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#setting-the-matcher/index.html)

You can set either `proxy.matcher` in `vercel.json`, or export a `config` object with a `matcher` property from your entrypoint.

The matcher accepts a single path or an array of paths:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "proxy": {
    "entrypoint": "src/proxy.ts",
    "matcher": ["/about/:path*", "/dashboard/:path*"]
  }
}
```

Without a matcher, your Routing Middleware runs on every request.

### [Setting function options](/content/docs/project-configuration/vercel-json\#setting-function-options/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#setting-function-options/index.html)

Set duration, memory, and other per-function options with the [`functions`](/content/docs/project-configuration/vercel-json#functions/index.html) property, keyed on your entrypoint path:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "proxy": {
    "entrypoint": "proxy.ts"
  },
  "functions": {
    "proxy.ts": {
      "maxDuration": 10
    }
  }
}
```

## [redirects](/content/docs/project-configuration/vercel-json\#redirects/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#redirects/index.html)

Type:`Array` of redirect `Object`.

Valid values: a list of redirect definitions.

### [Redirects examples](/content/docs/project-configuration/vercel-json\#redirects-examples/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#redirects-examples/index.html)

Some redirects and rewrites configurations can accidentally become gateways for semantic attacks. Learn how to check and protect your configurations with the [Enhancing Security for Redirects and Rewrites guide](/content/kb/guide/enhancing-security-for-redirects-and-rewrites/index.html).

This example redirects requests to the path `/me` from your site's root to the `profile.html` file relative to your site's root with a [307 Temporary Redirect](https://developer.mozilla.org/docs/Web/HTTP/Status/307):

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    { "source": "/me", "destination": "/profile.html", "permanent": false }\
  ]
}
```

This example redirects requests to the path `/me` from your site's root to the `profile.html` file relative to your site's root with a [308 Permanent Redirect](https://developer.mozilla.org/docs/Web/HTTP/Status/308):

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    { "source": "/me", "destination": "/profile.html", "permanent": true }\
  ]
}
```

This example redirects requests to the path `/user` from your site's root to the api route `/api/user` relative to your site's root with a [301 Moved Permanently](https://developer.mozilla.org/docs/Web/HTTP/Status/301):

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    { "source": "/user", "destination": "/api/user", "statusCode": 301 }\
  ]
}
```

This example redirects requests to the path `/view-source` from your site's root to the absolute path `https://github.com/vercel/vercel` of an external site with a redirect status of 308:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/view-source",\
      "destination": "https://github.com/vercel/vercel"\
    }\
  ]
}
```

This example redirects requests to all the paths (including all sub-directories and pages) from your site's root to the absolute path `https://vercel.com/docs` of an external site with a redirect status of 308:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/(.*)",\
      "destination": "https://vercel.com/docs"\
    }\
  ]
}
```

This example uses wildcard path matching to redirect requests to any path (including subdirectories) under `/blog/` from your site's root to a corresponding path under `/news/` relative to your site's root with a redirect status of 308:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/blog/:path*",\
      "destination": "/news/:path*"\
    }\
  ]
}
```

This example uses regex path matching to redirect requests to any path under `/posts/` that only contain numerical digits from your site's root to a corresponding path under `/news/` relative to your site's root with a redirect status of 308:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/post/:path(\\d{1,})",\
      "destination": "/news/:path*"\
    }\
  ]
}
```

This example redirects requests to any path from your site's root that does not start with `/uk/` and has `x-vercel-ip-country` header value of `GB` to a corresponding path under `/uk/` relative to your site's root with a redirect status of 307:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/:path((?!uk/).*)",\
      "has": [\
        {\
          "type": "header",\
          "key": "x-vercel-ip-country",\
          "value": "GB"\
        }\
      ],\
      "destination": "/uk/:path*",\
      "permanent": false\
    }\
  ]
}
```

Using `has` does not yet work locally while using
`vercel dev`, but does work when deployed.

### [Redirect object definition](/content/docs/project-configuration/vercel-json\#redirect-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#redirect-object-definition/index.html)

| Property | Description |
| --- | --- |
| `source` | A pattern that matches each incoming pathname (excluding querystring). |
| `destination` | A location destination defined as an absolute pathname or external URL. |
| `permanent` | An optional boolean to toggle between permanent and temporary redirect (default `true`). When `true`, the status code is [308](https://developer.mozilla.org/docs/Web/HTTP/Status/308). When `false` the status code is [307](https://developer.mozilla.org/docs/Web/HTTP/Status/307). |
| `statusCode` | An optional integer to define the status code of the redirect. Used when you need a value other than 307/308 from `permanent`, and therefore cannot be used with `permanent` boolean. |
| `has` | An optional array of `has` objects with the `type`, `key` and `value` properties. Used for conditional redirects based on the presence of specified properties. |
| `missing` | An optional array of `missing` objects with the `type`, `key` and `value` properties. Used for conditional redirects based on the absence of specified properties. |

### [Redirect `has` or `missing` object definition](/content/docs/project-configuration/vercel-json\#redirect-has-or-missing-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#redirect-has-or-missing-object-definition/index.html)

If `value` is an object, it has one or more of the following fields:

This example uses the expressive `value` object to define a route that redirects users with a redirect status of 308 to `/end` only if the `X-Custom-Header` header's value is prefixed by `valid` and ends with `value`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/start",\
      "destination": "/end",\
      "has": [\
        {\
          "type": "header",\
          "key": "X-Custom-Header",\
          "value": {\
            "pre": "valid",\
            "suf": "value"\
          }\
        }\
      ]\
    }\
  ]
}
```

Learn more about [redirects on Vercel](/content/docs/routing/redirects/index.html) and see [limitations](/content/docs/routing/redirects#limits/index.html).

## [bulkRedirectsPath](/content/docs/project-configuration/vercel-json\#bulkredirectspath/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#bulkredirectspath/index.html)

Learn more about [bulk redirects on Vercel](/content/docs/routing/redirects/bulk-redirects/index.html) and see [limits and pricing](/content/docs/routing/redirects/bulk-redirects#limits-and-pricing/index.html).

Type:`string` path to a file or folder.

The `bulkRedirectsPath` property can be used to import many thousands of redirects per project. These redirects do not support wildcard or header matching.

CSV, JSON, and JSONL file formats are supported, and the redirect files can be generated at build time as long as they end up in the location specified by `bulkRedirectsPath`. This can point to either a single file or a folder containing multiple redirect files.

### [CSV](/content/docs/project-configuration/vercel-json\#csv/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#csv/index.html)

CSV headers must match the field names below, can be specific in any order, and optional fields can be ommitted.

redirects.csv

```
source,destination,permanent
/source/path,/destination/path,true
/source/path-2,https://destination-site.com/destination/path,true
https://old-domain.com/page,/new-page,true
```

### [JSON](/content/docs/project-configuration/vercel-json\#json/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#json/index.html)

redirects.json

```
[\
    {\
        "source": "/source/path",\
        "destination": "/destination/path",\
        "permanent": true\
    },\
    {\
        "source": "/source/path-2",\
        "destination": "https://destination-site.com/destination/path",\
        "permanent": true\
    },\
    {\
        "source": "https://old-domain.com/page",\
        "destination": "/new-page",\
        "permanent": true\
    }\
]
```

### [JSONL](/content/docs/project-configuration/vercel-json\#jsonl/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#jsonl/index.html)

redirects.jsonl

```
{"source": "/source/path", "destination": "/destination/path", "permanent": true}
{"source": "/source/path-2", "destination": "https://destination-site.com/destination/path", "permanent": true}
{"source": "https://old-domain.com/page", "destination": "/new-page", "permanent": true}
```

You can test bulk redirects locally with [`vercel dev`](/content/docs/cli/dev/index.html) when you configure `bulkRedirectsPath` in `vercel.json`.

### [Bulk redirect field definition](/content/docs/project-configuration/vercel-json\#bulk-redirect-field-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#bulk-redirect-field-definition/index.html)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `source` | `string` | Yes | An absolute path or fully qualified URL that matches each incoming request, excluding the query string. The `source` field does not support query parameters. Vercel ignores any query parameters you include in `source`. Max 2048 characters. |
| `destination` | `string` | Yes | A location destination defined as an absolute pathname or external URL. Max 2048 characters. |
| `permanent` | `boolean` | No | Toggle between permanent ( [308](https://developer.mozilla.org/docs/Web/HTTP/Status/308)) and temporary ( [307](https://developer.mozilla.org/docs/Web/HTTP/Status/307)) redirect. Default: `false`. |
| `statusCode` | `integer` | No | Specify the exact status code. Can be [301](https://developer.mozilla.org/docs/Web/HTTP/Status/301), [302](https://developer.mozilla.org/docs/Web/HTTP/Status/302), [303](https://developer.mozilla.org/docs/Web/HTTP/Status/303), [307](https://developer.mozilla.org/docs/Web/HTTP/Status/307), or [308](https://developer.mozilla.org/docs/Web/HTTP/Status/308). Overrides permanent when set, otherwise defers to permanent value or default. |
| `caseSensitive` | `boolean` | No | Toggle whether source path matching is case sensitive. Default: `false`. |
| `preserveQueryParams` | `boolean` | No | Toggle whether to preserve the query string on the redirect. Default: `false`. |

To improve space efficiency, all boolean values can be the single characters `t` (true) or `f` (false) while using the CSV format.

## [regions](/content/docs/project-configuration/vercel-json\#regions/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#regions/index.html)

This value overrides the [Vercel Function Region](/content/docs/functions/configuring-functions/region/index.html) in Project Settings.

Type:`Array` of region identifier `String`.

Valid values: List of [regions](/content/docs/regions/index.html), defaults to `iad1`.

You can define the regions where your [Vercel functions](/content/docs/functions/index.html) are executed. Users on Pro and Enterprise can deploy to multiple regions. Hobby plans can select any single region. To learn more, see [Configuring Regions](/content/docs/functions/configuring-functions/region#project-configuration/index.html).

Function responses [can be cached](/content/docs/caching/cdn-cache/index.html) in the requested regions. Selecting a Vercel Function region does not impact static files, which are deployed to every region by default.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "regions": ["sfo1"]
}
```

You can also set `regions` on individual functions using the [`functions`](/content/docs/project-configuration/vercel-json#functions/index.html) property to override the project-level default. See [per-function region configuration](/content/docs/functions/configuring-functions/region#per-function-configuration/index.html) for more details.

## [functionFailoverRegions](/content/docs/project-configuration/vercel-json\#functionfailoverregions/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#functionfailoverregions/index.html)

Setting failover regions for Vercel functionsare availableon [Enterprise plans](/content/docs/plans/enterprise/index.html)

Set this property to specify the [region](/content/docs/functions/configuring-functions/region/index.html) to which a Vercel Function should fallback when the default region(s) are unavailable.

Type:`Array` of region identifier `String`.

Valid values: List of [regions](/content/docs/regions/index.html).

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "functionFailoverRegions": ["iad1", "sfo1"]
}
```

You can also set `functionFailoverRegions` on individual functions using the [`functions`](/content/docs/project-configuration/vercel-json#functions/index.html) property to override the project-level default. See [per-function region configuration](/content/docs/functions/configuring-functions/region#per-function-configuration/index.html) for more details.

These regions serve as a fallback to any regions specified in the [`regions` configuration](/content/docs/project-configuration/vercel-json#regions/index.html). The region Vercel selects to invoke your function depends on availability and ingress. For instance:

- Vercel always attempts to invoke the function in the primary region. If you specify more than one primary region in the `regions` property, Vercel selects the region geographically closest to the request
- If all primary regions are unavailable, Vercel automatically fails over to the regions specified in `functionFailoverRegions`, selecting the region geographically closest to the request
- The order of the regions in `functionFailoverRegions` does not matter as Vercel automatically selects the region geographically closest to the request

To learn more about automatic failover for Vercel Functions, see [Automatic failover](/content/docs/functions/configuring-functions/region#automatic-failover/index.html). Vercel Functions using the Edge runtime will [automatically failover](/content/docs/functions/configuring-functions/region#automatic-failover/index.html) with no configuration required.

Region failover is supported with Secure Compute, see [Region Failover](/content/docs/networking/secure-compute#region-failover/index.html) to learn more.

Want to talk to our team?

This feature is available on the Enterprise plan.

Schedule Call

## [rewrites](/content/docs/project-configuration/vercel-json\#rewrites/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#rewrites/index.html)

Type:`Array` of rewrite `Object`.

Valid values: a list of rewrite definitions.

If [`cleanUrls`](/content/docs/project-configuration/vercel-json#cleanurls/index.html) is set to `true` in
your project's `vercel.json`, do not include the file extension in the source
or destination path. For example, `/about-our-company.html` would be
`/about-our-company`

### [Rewrites examples](/content/docs/project-configuration/vercel-json\#rewrites-examples/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#rewrites-examples/index.html)

- This example rewrites requests to the path `/about` from your site's root to the `/about-our-company.html` file relative to your site's root:

vercel.json

```
{
    "$schema": "https://openapi.vercel.sh/vercel.json",
    "rewrites": [\
      { "source": "/about", "destination": "/about-our-company.html" }\
    ]
}
```

- This example rewrites all requests to the root path which is often used for a Single Page Application (SPA).

vercel.json

```
{
    "$schema": "https://openapi.vercel.sh/vercel.json",
    "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}
```

- This example rewrites requests to the paths under `/resize` with 2 path levels (defined as variables `width` and `height` that can be used in the destination value) to the api route `/api/sharp` relative to your site's root:

vercel.json

```
{
    "$schema": "https://openapi.vercel.sh/vercel.json",
    "rewrites": [\
      { "source": "/resize/:width/:height", "destination": "/api/sharp" }\
    ]
}
```

- This example uses wildcard path matching to rewrite requests to any path (including subdirectories) under `/proxy/` from your site's root to a corresponding path under the root of an external site `https://example.com/`:

vercel.json

```
{
    "$schema": "https://openapi.vercel.sh/vercel.json",
    "rewrites": [\
      {\
        "source": "/proxy/:match*",\
        "destination": "https://example.com/:match*"\
      }\
    ]
}
```

- This example rewrites requests to any path from your site's root that does not start with /uk/ and has x-vercel-ip-country header value of GB to a corresponding path under /uk/ relative to your site's root:

vercel.json

```
{
    "$schema": "https://openapi.vercel.sh/vercel.json",
    "rewrites": [\
      {\
        "source": "/:path((?!uk/).*)",\
        "has": [\
          {\
            "type": "header",\
            "key": "x-vercel-ip-country",\
            "value": "GB"\
          }\
        ],\
        "destination": "/uk/:path*"\
      }\
    ]
}
```

- This example rewrites requests to the path `/dashboard` from your site's root that does not have a cookie with key `auth_token` to the path `/login` relative to your site's root:

vercel.json

```
{
    "$schema": "https://openapi.vercel.sh/vercel.json",
    "rewrites": [\
      {\
        "source": "/dashboard",\
        "missing": [\
          {\
            "type": "cookie",\
            "key": "auth_token"\
          }\
        ],\
        "destination": "/login"\
      }\
    ]
}
```

### [Rewrite object definition](/content/docs/project-configuration/vercel-json\#rewrite-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#rewrite-object-definition/index.html)

| Property | Description |
| --- | --- |
| `source` | A pattern that matches each incoming pathname (excluding querystring). |
| `destination` | A location destination defined as an absolute pathname or external URL. |
| `permanent` | A boolean to toggle between permanent and temporary redirect (default true). When `true`, the status code is [308](https://developer.mozilla.org/docs/Web/HTTP/Status/308). When `false` the status code is [307](https://developer.mozilla.org/docs/Web/HTTP/Status/307). |
| `has` | An optional array of `has` objects with the `type`, `key` and `value` properties. Used for conditional rewrites based on the presence of specified properties. |
| `missing` | An optional array of `missing` objects with the `type`, `key` and `value` properties. Used for conditional rewrites based on the absence of specified properties. |

### [Rewrite `has` or `missing` object definition](/content/docs/project-configuration/vercel-json\#rewrite-has-or-missing-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#rewrite-has-or-missing-object-definition/index.html)

If `value` is an object, it has one or more of the following fields:

This example demonstrates using the expressive `value` object to define a route that rewrites users to `/end` only if the `X-Custom-Header` header's value is prefixed by `valid` and ends with `value`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "rewrites": [\
    {\
      "source": "/start",\
      "destination": "/end",\
      "has": [\
        {\
          "type": "header",\
          "key": "X-Custom-Header",\
          "value": {\
            "pre": "valid",\
            "suf": "value"\
          }\
        }\
      ]\
    }\
  ]
}
```

The `source` property should NOT be a file because precedence is given to the filesystem prior to rewrites being applied. Instead, you should rename your static file or Vercel Function.

Using `has` does not yet work locally while using`vercel dev`, but does work when deployed.

Learn more about [rewrites](/content/docs/routing/rewrites/index.html) on Vercel.

## [routes](/content/docs/project-configuration/vercel-json\#routes/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#routes/index.html)

The `routes` property lets you define routing rules using [PCRE-compatible regular expressions](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions). You can use `routes` alongside [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html), [`redirects`](/content/docs/project-configuration/vercel-json#redirects/index.html), [`headers`](/content/docs/project-configuration/vercel-json#headers/index.html), [`cleanUrls`](/content/docs/project-configuration/vercel-json#cleanurls/index.html), and [`trailingSlash`](/content/docs/project-configuration/vercel-json#trailingslash/index.html).

For common use cases, use those higher-level properties instead. See [Routes vs higher-level properties](/content/docs/project-configuration/vercel-json#routes-vs-higher-level-properties/index.html) for guidance on when to use each.

Type:`Array` of route `Object`.

Valid values: a list of route definitions.

### [Route object definition](/content/docs/project-configuration/vercel-json\#route-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#route-object-definition/index.html)

| Property | Alias | Type | Description |
| --- | --- | --- | --- |
| `src` | `source` | `String` | A PCRE-compatible regular expression that matches each incoming pathname (excluding querystring). |
| `methods` |  | `String[]` | A set of HTTP method types. If you omit this property, the route matches any HTTP method. |
| `dest` | `destination` | `String` | A destination pathname or full URL, including querystring, with the ability to embed capture groups as $1, $2…<br>When used with the route's `env` property, you can also reference environment variables using `$VAR`or`${VAR}` syntax. |
| `headers` |  | `Object` | A set of headers to apply for responses. |
| `status` | `statusCode` | `Number` | A status code to respond with. Can be used in tandem with `Location:` header to implement redirects. |
| `continue` |  | `Boolean` | If `true`, routing will continue even when the `src` is matched. |
| `has` |  | `Array` | An array of [`has` objects](/content/docs/project-configuration/vercel-json#conditional-matching-with-has-and-missing/index.html) with the `type`, `key`, and `value` properties. Used for conditional path matching based on the presence of specified properties. |
| `missing` |  | `Array` | An array of [`missing` objects](/content/docs/project-configuration/vercel-json#conditional-matching-with-has-and-missing/index.html) with the `type`, `key`, and `value` properties. Used for conditional path matching based on the absence of specified properties. |
| `mitigate` |  | `Object` | An object with the property `action`, which can either be "challenge" or "deny". The specified action performs [mitigation](/content/docs/vercel-firewall/vercel-waf/custom-rules#custom-rule-configuration/index.html) on requests that match the route. |
| `transforms` |  | `Array` | An array of `transform` objects. Transform rules let you append, set, or remove request/response headers and query parameters at the edge. See [transform examples](/content/docs/project-configuration/vercel-json#transform-examples/index.html). |
| `env` |  | `String[]` | A whitelist of [environment variable](/content/docs/environment-variables/index.html) names whose values replace `$VAR` or `${VAR}` references in `dest` values at request time. Only variables listed here are available for expansion. See [using environment variables in routes](/content/docs/project-configuration/vercel-json#using-environment-variables-in-routes/index.html). |

The `source`, `destination`, and `statusCode` aliases provide consistency with the `rewrites`, `redirects`, and `headers` properties, which use the same naming conventions.

Vercel processes routes in the order you define them in the array, so wildcard/catch-all patterns should usually be last.

### [Deprecated route properties](/content/docs/project-configuration/vercel-json\#deprecated-route-properties/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#deprecated-route-properties/index.html)

The following route properties are deprecated:

- `handle`: A special route type (e.g., `"handle": "filesystem"`) that controls routing phases. Use [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html) instead, which checks the filesystem by default.
- `important`: A boolean that forces the route to take precedence. Use [`redirects`](/content/docs/project-configuration/vercel-json#redirects/index.html) or [`headers`](/content/docs/project-configuration/vercel-json#headers/index.html) instead.
- `override`: A boolean that overrides the matched path in the filesystem. Use [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html) instead.

### [Conditional matching with `has` and `missing`](/content/docs/project-configuration/vercel-json\#conditional-matching-with-has-and-missing/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#conditional-matching-with-has-and-missing/index.html)

If `value` is an object, it has one or more of the following fields:

This example uses the `value` object to define a route that only rewrites to `/end` if the `X-Custom-Header` header's value starts with `valid` and ends with `value`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/start",\
      "dest": "/end",\
      "has": [\
        {\
          "type": "header",\
          "key": "X-Custom-Header",\
          "value": {\
            "pre": "valid",\
            "suf": "value"\
          }\
        }\
      ]\
    }\
  ]
}
```

This example configures custom routes that map to static files and [Vercel functions](/content/docs/functions/index.html):

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/redirect",\
      "status": 308,\
      "headers": { "Location": "https://example.com/" }\
    },\
    {\
      "src": "/custom-page",\
      "headers": { "cache-control": "s-maxage=1000" },\
      "dest": "/index.html"\
    },\
    { "src": "/api", "dest": "/my-api.js" },\
    { "src": "/users", "methods": ["POST"], "dest": "/users-api.js" },\
    { "src": "/users/(?<id>[^/]*)", "dest": "/users-api.js?id=$id" },\
    { "src": "/legacy", "status": 404 },\
    { "src": "/.*", "dest": "https://my-old-site.com" }\
  ]
}
```

### [Transform object definition](/content/docs/project-configuration/vercel-json\#transform-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#transform-object-definition/index.html)

| Property | Type | Description |
| --- | --- | --- |
| `type` | `String` | Must be `request.query`, `request.headers`, `response.headers`, or `request.path`. This specifies the scope of what your transforms will apply to. |
| `op` | `String` | These specify the possible operations:<br>\- `append` appends `args` to the value of the key, and will set if missing<br>\- `set` sets the key and value if missing<br>\- `delete` deletes the key entirely if `args` is not provided; otherwise, it will delete the value of `args` from the matching key<br>The `request.path` transform only supports `set`. |
| `target` | `Object` | An object with key `key`, which is either a `String` or an `Object`. If it is a string, the transform uses it as the header or query key. If it is an object, it may contain one or more of the properties [seen below.](/content/docs/project-configuration/vercel-json#transform-target-object-definition/index.html)<br>Not used for `request.path` transforms, which operate on the request path as a whole rather than a named key. |
| `args` | `String` or `String[]` or `undefined` | If `args` is a string or string array, it will be used as the value for the target according to the `op` property.<br>The `request.path` transform requires `args` to be a single `String`; an array is rejected.<br>When `env` is also set, `$VAR` and `${VAR}` references in `args` are replaced with environment variable values at request time. |
| `env` | `String[]` or `undefined` | A whitelist of [environment variable](/content/docs/environment-variables/index.html) names whose values replace `$VAR` or `${VAR}` references in `args` at request time. Only variables listed here are available for expansion. A maximum of 64 entries. See [using environment variables in transforms](/content/docs/project-configuration/vercel-json#in-transforms/index.html). |

#### [Transform target object definition](/content/docs/project-configuration/vercel-json\#transform-target-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#transform-target-object-definition/index.html)

Target is an object with a `key` property. For the `set` operation, the transform uses `key` as the header or query key. For other operations, `key` acts as a matching condition to determine if the transform should apply.

| Property | Type | Description |
| --- | --- | --- |
| `key` | `String` or `Object` | It may be a string or an object. If it is an object, it must have one or more of the properties defined in the [Transform key object definition](/content/docs/project-configuration/vercel-json#transform-key-object-definition/index.html) below. |

#### [Transform key object definition](/content/docs/project-configuration/vercel-json\#transform-key-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#transform-key-object-definition/index.html)

When the `key` property is an object, it can contain one or more of the following conditional matching properties:

| Property | Type | Description |
| --- | --- | --- |
| `eq` | `String` or `Number` | Check equality on a value |
| `neq` | `String` | Check inequality on a value |
| `inc` | `String[]` | Check inclusion in an array of values |
| `ninc` | `String[]` | Check non-inclusion in an array of values |
| `pre` | `String` | Check if value starts with a prefix |
| `suf` | `String` | Check if value ends with a suffix |
| `gt` | `Number` | Check if value is greater than |
| `gte` | `Number` | Check if value is greater than or equal to |
| `lt` | `Number` | Check if value is less than |
| `lte` | `Number` | Check if value is less than or equal to |

#### [Request path transform](/content/docs/project-configuration/vercel-json\#request-path-transform/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#request-path-transform/index.html)

The `request.path` transform overrides the path that the target runtime observes for a request. This is the URL path your Function reads from `req.url`. It does not change route selection or the destination, and it does not terminate routing. Routing continues after the override, so later routes can still match and rewrite. Adjusting the path and rewriting are separate steps, so you can do both.

Because the path is a single value rather than a named target or key, the only supported `op` is `set`, and `args` must be a single string:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/home",\
      "transforms": [\
        {\
          "type": "request.path",\
          "op": "set",\
          "args": "/new/path"\
        }\
      ]\
    }\
  ]
}
```

The `args` value must follow these rules, otherwise the transform is rejected with an error:

- It must start with `/`.
- It must not be scheme-relative (no leading `//host`).
- It must not contain a query string.
- It must not contain whitespace or control characters. Carriage return and line feed characters are rejected as a request-smuggling guard.

You can use the same substitution support as the other transforms in `args`:

- Capture groups from the matched route `src`: numbered (`$1`), named (`$name`), and the built-ins `$host` and `$wildcard`.
- Environment variable expansion when the transform declares an `env` allowlist.

When multiple matching routes set `request.path`, the transform composes across them and is last-write-wins. A later `request.path` set overrides an earlier one. The override is included in the CDN cache key, so two requests that differ only by their `request.path` override are cached as separate entries.

#### [Request path transform in a service](/content/docs/project-configuration/vercel-json\#request-path-transform-in-a-service/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#request-path-transform-in-a-service/index.html)

Within a [service](/content/docs/services/index.html), a `request.path` transform in the service's own `routes` changes the path the service's runtime observes. A top-level rewrite selects which service handles a request, and the service receives the original path. A `request.path` transform inside the service then rewrites the path its code reads from a request, without changing what was routed.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "services": {
    "my_backend": {
      "root": "backend/",
      "entrypoint": "main:app",
      "routes": [\
        {\
          "src": "/api/(.*)",\
          "transforms": [\
            {\
              "type": "request.path",\
              "op": "set",\
              "args": "/$1"\
            }\
          ]\
        }\
      ]
    }
  },
  "rewrites": [\
    { "source": "/api/(.*)", "destination": { "service": "my_backend" } }\
  ]
}
```

A public request to `/api/users` is routed to `my_backend`, and the service's code observes `/users`. See [Services routing](/content/docs/services/routing/index.html) for how the path a service sees relates to route selection.

#### [Transform examples](/content/docs/project-configuration/vercel-json\#transform-examples/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#transform-examples/index.html)

In this example, you remove the incoming request header `x-custom-header` from all requests and responses to the `/home` route:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/home",\
      "transforms": [\
        {\
          "type": "request.headers",\
          "op": "delete",\
          "target": {\
            "key": "x-custom-header"\
          }\
        },\
        {\
          "type": "response.headers",\
          "op": "delete",\
          "target": {\
            "key": "x-custom-header"\
          }\
        }\
      ]\
    }\
  ]
}
```

In this example, you override the incoming query parameter `theme` to `dark` for all requests to the `/home` route, and set if it doesn't already exist:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/home",\
      "transforms": [\
        {\
          "type": "request.query",\
          "op": "set",\
          "target": {\
            "key": "theme"\
          },\
          "args": "dark"\
        }\
      ]\
    }\
  ]
}
```

In this example, you append multiple values to the incoming request header `x-content-type-options` for all requests to the `/home` route:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/home",\
      "transforms": [\
        {\
          "type": "request.headers",\
          "op": "append",\
          "target": {\
            "key": "x-content-type-options"\
          },\
          "args": ["nosniff", "no-sniff"]\
        }\
      ]\
    }\
  ]
}
```

In this example, you delete any header that begins with `x-react-router-` for all requests to the `/home` route:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/home",\
      "transforms": [\
        {\
          "type": "request.headers",\
          "op": "delete",\
          "target": {\
            "key": {\
              "pre": "x-react-router-"\
            }\
          }\
        }\
      ]\
    }\
  ]
}
```

In this example, you rewrite the path the runtime observes using a capture group from the matched `src`. A request to `/articles/42` reaches the same destination, but the Function reads `/posts/42` from `req.url`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/articles/(?<id>[^/]+)",\
      "transforms": [\
        {\
          "type": "request.path",\
          "op": "set",\
          "args": "/posts/$id"\
        }\
      ]\
    }\
  ]
}
```

### [Using environment variables in routes](/content/docs/project-configuration/vercel-json\#using-environment-variables-in-routes/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#using-environment-variables-in-routes/index.html)

You can reference [environment variables](/content/docs/environment-variables/index.html) in route `dest` values and transform `args` using `$VAR` or `${VAR}` syntax. Add the variable names to the `env` array on the route or transform so they're available for expansion at request time. Values come from your project's environment variables.

If a referenced variable isn't set in your project's environment, the `$VAR` reference stays as a literal string in the output.

#### [In route destinations](/content/docs/project-configuration/vercel-json\#in-route-destinations/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#in-route-destinations/index.html)

Use the `env` property on a route to expand environment variables in `dest`. This example proxies all requests under `/api/` to a backend URL stored in the `BACKEND_URL` environment variable:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/api/(.*)",\
      "dest": "${BACKEND_URL}/api/$1",\
      "env": ["BACKEND_URL"]\
    }\
  ]
}
```

#### [In transforms](/content/docs/project-configuration/vercel-json\#in-transforms/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#in-transforms/index.html)

Use the `env` property on a transform to expand environment variables in `args`. This example sets a request header `x-api-key` to the value of the `API_KEY` environment variable for all requests to the `/api` route:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/api/(.*)",\
      "transforms": [\
        {\
          "type": "request.headers",\
          "op": "set",\
          "target": {\
            "key": "x-api-key"\
          },\
          "args": "$API_KEY",\
          "env": ["API_KEY"]\
        }\
      ]\
    }\
  ]
}
```

You can reference multiple environment variables in a single `args` value. List all referenced variables in the `env` array:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/proxy/(.*)",\
      "transforms": [\
        {\
          "type": "request.headers",\
          "op": "set",\
          "target": {\
            "key": "authorization"\
          },\
          "args": "Bearer ${AUTH_TOKEN}",\
          "env": ["AUTH_TOKEN"]\
        }\
      ]\
    }\
  ]
}
```

You can combine transforms with the [`has` and `missing` properties](/content/docs/project-configuration/vercel-json#conditional-matching-with-has-and-missing/index.html) and the matching conditions in the [Transform key object definition](/content/docs/project-configuration/vercel-json#transform-key-object-definition/index.html).

### [Routes vs higher-level properties](/content/docs/project-configuration/vercel-json\#routes-vs-higher-level-properties/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#routes-vs-higher-level-properties/index.html)

For common use cases like redirects, rewrites, and custom headers, the higher-level [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html), [`redirects`](/content/docs/project-configuration/vercel-json#redirects/index.html), [`headers`](/content/docs/project-configuration/vercel-json#headers/index.html), [`cleanUrls`](/content/docs/project-configuration/vercel-json#cleanurls/index.html), and [`trailingSlash`](/content/docs/project-configuration/vercel-json#trailingslash/index.html) properties offer a more concise alternative to `routes`. You can use both in the same configuration.

The following examples show how common `routes` patterns map to higher-level properties.

#### [Route parameters](/content/docs/project-configuration/vercel-json\#route-parameters/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#route-parameters/index.html)

With `routes`, you use a [PCRE-compatible regular expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) named group to match the ID and then pass that parameter in the query string. The following example matches a URL like `/product/532004` and proxies to `/api/product?id=532004`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [{ "src": "/product/(?<id>[^/]+)", "dest": "/api/product?id=$id" }]
}
```

With [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html), named parameters pass through in the query string. The following example is equivalent to the `routes` usage above, but uses `rewrites` instead:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "rewrites": [{ "source": "/product/:id", "destination": "/api/product" }]
}
```

#### [Redirects](/content/docs/project-configuration/vercel-json\#routes-vs-higher-level-properties-redirects/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#routes-vs-higher-level-properties-redirects/index.html)

With `routes`, you specify the status code to use a 307 Temporary Redirect. Also, this redirect needs to be defined before other routes. The following example redirects all paths in the `posts` directory to the `blog` directory, but keeps the path in the new location:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/posts/(.*)",\
      "headers": { "Location": "/blog/$1" },\
      "status": 307\
    }\
  ]
}
```

With [`redirects`](/content/docs/project-configuration/vercel-json#redirects/index.html), you disable the `permanent` property to use a 307 Temporary Redirect. Also, `redirects` are always processed before `rewrites`. The following example is equivalent to the `routes` usage above, but uses `redirects` instead:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "redirects": [\
    {\
      "source": "/posts/:id",\
      "destination": "/blog/:id",\
      "permanent": false\
    }\
  ]
}
```

#### [Headers](/content/docs/project-configuration/vercel-json\#routes-vs-higher-level-properties-headers/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#routes-vs-higher-level-properties-headers/index.html)

With `routes`, you use `"continue": true` to prevent stopping at the first match. The following example adds `Cache-Control` headers to the favicon and other static assets:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [\
    {\
      "src": "/favicon.ico",\
      "headers": { "Cache-Control": "public, max-age=3600" },\
      "continue": true\
    },\
    {\
      "src": "/assets/(.*)",\
      "headers": { "Cache-Control": "public, max-age=31556952, immutable" },\
      "continue": true\
    }\
  ]
}
```

With [`headers`](/content/docs/project-configuration/vercel-json#headers/index.html), this is no longer necessary since that is the default behavior. The following example is equivalent to the `routes` usage above, but uses `headers` instead:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "headers": [\
    {\
      "source": "/favicon.ico",\
      "headers": [\
        {\
          "key": "Cache-Control",\
          "value": "public, max-age=3600"\
        }\
      ]\
    },\
    {\
      "source": "/assets/(.*)",\
      "headers": [\
        {\
          "key": "Cache-Control",\
          "value": "public, max-age=31556952, immutable"\
        }\
      ]\
    }\
  ]
}
```

#### [Pattern matching](/content/docs/project-configuration/vercel-json\#pattern-matching/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#pattern-matching/index.html)

With `routes`, you need to escape a dot with two backslashes, otherwise it would match any character [PCRE-compatible regular expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions). The following example matches the literal `atom.xml` and proxies to `/api/rss` to dynamically generate RSS:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [{ "src": "/atom\\.xml", "dest": "/api/rss" }]
}
```

With [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html), the `.` is not a special character so it does not need to be escaped. The following example is equivalent to the `routes` usage above, but instead uses `rewrites`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "rewrites": [{ "source": "/atom.xml", "destination": "/api/rss" }]
}
```

#### [Negative lookahead](/content/docs/project-configuration/vercel-json\#negative-lookahead/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#negative-lookahead/index.html)

With `routes`, you use [PCRE-compatible regular expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) negative lookahead. The following example proxies all requests to the `/maintenance` page except for `/maintenance` itself to avoid an infinite loop:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "routes": [{ "src": "/(?!maintenance)", "dest": "/maintenance" }]
}
```

With [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html), the regex needs to be wrapped in a capture group. The following example is equivalent to the `routes` usage above, but instead uses `rewrites`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "rewrites": [\
    { "source": "/((?!maintenance).*)", "destination": "/maintenance" }\
  ]
}
```

#### [Case sensitivity](/content/docs/project-configuration/vercel-json\#case-sensitivity/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#case-sensitivity/index.html)

With `routes`, the `src` property is case-insensitive, so multiple request paths with different cases serve the same page, creating duplicate content.

With [`rewrites`](/content/docs/project-configuration/vercel-json#rewrites/index.html) / [`redirects`](/content/docs/project-configuration/vercel-json#redirects/index.html) / [`headers`](/content/docs/project-configuration/vercel-json#headers/index.html), the `source` property is case-sensitive so you don't accidentally create duplicate content.

## [trailingSlash](/content/docs/project-configuration/vercel-json\#trailingslash/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#trailingslash/index.html)

Type: `Boolean`.

Default Value: `undefined`.

### [false](/content/docs/project-configuration/vercel-json\#false/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#false/index.html)

When `trailingSlash: false`, visiting a path that ends with a forward slash will respond with a 308 status code and redirect to the path without the trailing slash.

For example, the `/about/` path will redirect to `/about`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "trailingSlash": false
}
```

### [true](/content/docs/project-configuration/vercel-json\#true/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#true/index.html)

When `trailingSlash: true`, visiting a path that does not end with a forward slash will respond with a 308 status code and redirect to the path with a trailing slash.

For example, the `/about` path will redirect to `/about/`.

However, paths with a file extension will not redirect to a trailing slash.

For example, the `/about/styles.css` path will not redirect, but the `/about/styles` path will redirect to `/about/styles/`.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "trailingSlash": true
}
```

### [undefined](/content/docs/project-configuration/vercel-json\#undefined/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#undefined/index.html)

When `trailingSlash: undefined`, visiting a path with or without a trailing slash will not redirect.

For example, both `/about` and `/about/` will serve the same content without redirecting.

This is not recommended because it could lead to search engines indexing two different pages with duplicate content.

## [public](/content/docs/project-configuration/vercel-json\#public/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#public/index.html)

The `public` property is no longer supported and will cause deployment
failures. Remove it from your `vercel.json` immediately to fix broken
deployments.

Remove the `"public"` key from your `vercel.json`:

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json"
}
```

Deployments always keep [source view](/content/docs/builds/build-features#source-view/index.html) and [logs view](/content/docs/builds/build-features#logs-view/index.html) protected behind authentication. The `public` property had no effect and is no longer accepted by the validator.

## [Legacy](/content/docs/project-configuration/vercel-json\#legacy/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#legacy/index.html)

Legacy properties are still supported for backwards compatibility, but are deprecated.

### [name](/content/docs/project-configuration/vercel-json\#name/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#name/index.html)

The `name` property has been deprecated in favor of [Project Linking](/content/docs/cli/project-linking/index.html), which allows you to link a Vercel project to your local codebase when you run `vercel`.

Type: `String`.

Valid values: string name for the deployment.

Limits:

- A maximum length of 52 characters
- Only lower case alphanumeric characters or hyphens are allowed
- Cannot begin or end with a hyphen, or contain multiple consecutive hyphens

The prefix for all new deployment instances. Vercel CLI usually generates this field automatically based on the name of the directory. But if you'd like to define it explicitly, this is the way to go.

The defined name is also used to organize the deployment into [a project](/content/docs/projects/index.html).

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "name": "example-app"
}
```

### [version](/content/docs/project-configuration/vercel-json\#version/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#version/index.html)

The `version` property should not be used anymore.

Type: `Number`.

Valid values: `1`, `2`.

Specifies the Vercel Platform version the deployment should use.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "version": 2
}
```

### [alias](/content/docs/project-configuration/vercel-json\#alias/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#alias/index.html)

The `alias` property should not be used anymore. To assign a custom Domain to your project, please [define it in the Project Settings](/content/docs/domains/working-with-domains/add-a-domain/index.html) instead. Once your domains are, they will take precedence over the configuration property.

Type: `Array` or `String`.

Valid values: [domain names](/content/docs/domains/working-with-domains/add-a-domain/index.html) (optionally including subdomains) added to the account, or a string for a suffixed URL using `.vercel.app` or a Custom Deployment Suffix ( [available on the Enterprise plan](/content/pricing/index.html)).

Limit: A maximum of 64 aliases in the array.

The alias or aliases are applied automatically using [Vercel for GitHub](/content/docs/git/vercel-for-github/index.html), [Vercel for GitLab](/content/docs/git/vercel-for-gitlab/index.html), or [Vercel for Bitbucket](/content/docs/git/vercel-for-bitbucket/index.html) when merging or pushing to the [Production Branch](/content/docs/git#production-branch/index.html).

You can deploy to the defined aliases using [Vercel CLI](/content/docs/cli/index.html) by setting the [production deployment environment target](/content/docs/domains/working-with-domains/deploying-and-redirecting/index.html).

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "alias": ["my-domain.com", "my-alias"]
}
```

### [scope](/content/docs/project-configuration/vercel-json\#scope/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#scope/index.html)

The `scope` property has been deprecated in favor of [Project Linking](/content/docs/cli/project-linking/index.html), which allows you to link a Vercel project to your local codebase when you run `vercel`.

Type: `String`.

Valid values: For teams, either an ID or slug. For users, either a email address, username, or ID.

This property determines the scope ( [Hobby team](/content/docs/accounts#creating-a-hobby-account/index.html) or [team](/content/docs/accounts#creating-a-team/index.html)) under which the project will be deployed by [Vercel CLI](/content/cli/index.html).

It also affects any other actions that the user takes within the directory that contains this configuration (e.g. listing [environment variables](/content/docs/environment-variables/index.html) using `vercel secrets ls`).

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "scope": "my-team"
}
```

Deployments made through [Git](/content/docs/git/index.html) will ignore the `scope` property because the repository is already connected to [project](/content/docs/projects/index.html).

### [env](/content/docs/project-configuration/vercel-json\#env/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#env/index.html)

We recommend against using this property. To add custom environment variables to your project [define them in the Project Settings](/content/docs/environment-variables/index.html).

Type:`Object` of `String` keys and values.

Valid values: environment keys and values.

Environment variables passed to the invoked [Vercel functions](/content/docs/functions/index.html).

This example will pass the `MY_KEY` static env to all [Vercel functions](/content/docs/functions/index.html) and the `SECRET` resolved from the `my-secret-name` [secret](/content/docs/environment-variables/reserved-environment-variables/index.html) dynamically.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "env": {
    "MY_KEY": "this is the value",
    "SECRET": "@my-secret-name"
  }
}
```

### [build.env](/content/docs/project-configuration/vercel-json\#build.env) [Copy link to section](/content/docs/project-configuration/vercel-json\#build.env)

Type:`Object` of `String` keys and values inside the `build``Object`.

Valid values: environment keys and values.

[Environment variables](/content/docs/environment-variables/index.html) passed to the [Build](/content/docs/builds/configure-a-build/index.html) processes.

The following example will pass the `MY_KEY` environment variable to all [Builds](/content/docs/builds/configure-a-build/index.html) and the `SECRET` resolved from the `my-secret-name` [secret](/content/docs/environment-variables/reserved-environment-variables/index.html) dynamically.

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "env": {
    "MY_KEY": "this is the value",
    "SECRET": "@my-secret-name"
  }
}
```

### [builds](/content/docs/project-configuration/vercel-json\#builds/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#builds/index.html)

We recommend against using this property. To customize Vercel functions, please use the [functions](/content/docs/project-configuration/vercel-json#functions/index.html) property instead. If you'd like to deploy a monorepo, see the [Monorepo docs](/content/docs/monorepos/index.html).

Type:`Array` of build `Object`.

Valid values: a list of build descriptions whose `src` references valid source files.

#### [Build object definition](/content/docs/project-configuration/vercel-json\#build-object-definition/index.html) [Copy link to section](/content/docs/project-configuration/vercel-json\#build-object-definition/index.html)

- `src` (`String`): A glob expression or pathname. If more than one file is resolved, one build will be created per matched file. It can include `*` and `**`.
- `use` (`String`): An npm module to be installed by the build process. It can include a semver compatible version (e.g.: `@org/proj@1`).
- `config` (`Object`): Optionally, an object including arbitrary metadata to be passed to the Builder.

The following will include all HTML files as-is (to be served statically), and build all Python files and JS files into [Vercel functions](/content/docs/functions/index.html):

vercel.json

```
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "builds": [\
    { "src": "*.html", "use": "@vercel/static" },\
    { "src": "*.py", "use": "@vercel/python" },\
    { "src": "*.js", "use": "@vercel/node" }\
  ]
}
```

When at least one `builds` item is specified, only the outputs of the build processes will be included in the resulting deployment as a security precaution. This is why we need to allowlist static files explicitly with `@vercel/static`.

Last updated August 14, 2026

Related Vercel documentation

## Cross-link map: Static Configuration with vercel.json (/docs/project-configuration/vercel-json)

> From the Vercel docs graph (built 2026-09-25T05:54:54.356Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: [https://vercel.com/docs/graph.json](/content/docs/graph.json)

### Semantically closest pages

- [Programmatic Configuration with vercel.ts](/content/docs/project-configuration/vercel-ts?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=semantic&surface=html/index.html) — Define your Vercel configuration in vercel.ts with @vercel/config for type-safe routing and build settings.
- [Vercel Primitives](/content/docs/build-output-api/primitives?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=semantic&surface=html/index.html) — Learn about the Vercel platform primitives and how they work together to create a Vercel Deployment.
- [Advanced Configuration](/content/docs/functions/configuring-functions/advanced-configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=semantic&surface=html/index.html) — Learn how to add utility files to the /api directory, and bundle Vercel Functions.
- [Runtimes](/content/docs/functions/runtimes?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=semantic&surface=html/index.html) — Runtimes transform your source code into Functions, which are served by our CDN. Learn about the official runtimes suppo
- [Build Output Configuration](/content/docs/build-output-api/configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=semantic&surface=html/index.html) — Learn about the Build Output Configuration file, which is used to configure the behavior of a Deployment.

### Prerequisites

- [Project Configuration](/content/docs/project-configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=prerequisite&surface=html/index.html) — Learn how to configure your Vercel projects using vercel.json, vercel.toml, vercel.ts, or the dashboard to control build

### This page links to (46)

- [output](https://nextjs.org/docs/app/api-reference/config/next-config-js/output?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html) — Next.js automatically traces which files are needed by each page to allow for easy deployment of your application. Learn
- [Account Management](/content/docs/accounts?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to manage your Vercel account and team members.
- [Build Features for Customizing Deployments](/content/docs/builds/build-features?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to customize your deployments using Vercel's build features.
- [Configuring a Build](/content/docs/builds/configure-a-build?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Vercel automatically configures the build settings for many front-end frameworks, but you can also customize the build a
- [Vercel CDN Cache](/content/docs/caching/cdn-cache?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how Vercel's CDN cache stores your content across a global network to reduce latency and origin load.
- [Vercel CLI Overview](/content/docs/cli?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to use the Vercel command-line interface \\(CLI\\) to manage and configure your Vercel Projects from the command
- [vercel dev](/content/docs/cli/dev?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to replicate the Vercel deployment environment locally and test your Vercel Project before deploying using the
- [Linking Projects with Vercel CLI](/content/docs/cli/project-linking?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to link existing Vercel Projects with Vercel CLI.
- [Cron Jobs](/content/docs/cron-jobs?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn about cron jobs, how they work, and how to use them on Vercel.
- [Environments](/content/docs/deployments/environments?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Environments are for developing locally, testing changes in a pre-production environment, and serving end-users in produ
- [Adding & Configuring a Custom Domain](/content/docs/domains/working-with-domains/add-a-domain?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to add a custom domain to your Vercel project, verify it, and correctly set the DNS or Nameserver values.
- [Deploying & Redirecting Domains](/content/docs/domains/working-with-domains/deploying-and-redirecting?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to deploy your domains and set up domain redirects with this guide.
- [Environment variables](/content/docs/environment-variables?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn more about environment variables on Vercel.
- [Reserved environment variables](/content/docs/environment-variables/reserved-environment-variables?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Reserved environment variables are reserved by Vercel Vercel Function runtimes.
- [Fluid compute](/content/docs/fluid-compute?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn about fluid compute, an execution model for Vercel Functions that provides a more flexible and efficient way to ru
- [Vercel Functions](/content/docs/functions?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Build API routes, webhooks, and agent request handlers with Vercel Functions, then test and debug them with Vercel CLI.
- [Configuring Memory and CPU for Vercel Functions](/content/docs/functions/configuring-functions/memory?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to set the memory / CPU of a Vercel Function.
- [Configuring regions for Vercel Functions](/content/docs/functions/configuring-functions/region?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to configure regions for Vercel Functions.
- [Functions API Reference](/content/docs/functions/functions-api-reference?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn about available APIs when working with Vercel Functions.
- [Vercel Functions Limits](/content/docs/functions/limitations?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn about the limits and restrictions of using Vercel Functions.
- [Runtimes](/content/docs/functions/runtimes?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Runtimes transform your source code into Functions, which are served by our CDN. Learn about the official runtimes suppo
- [Using the Bun Runtime with Vercel Functions](/content/docs/functions/runtimes/bun?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to use the Bun runtime with Vercel Functions to create fast, efficient functions.
- [Edge Runtime](/content/docs/functions/runtimes/edge?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn about the Edge runtime, an environment in which Vercel Functions can run.
- [Using the Node.js Runtime with Vercel Functions](/content/docs/functions/runtimes/node-js?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to use the Node.js runtime to create functions and deploy Node.js servers on Vercel.
- [Deploying Git Repositories with Vercel](/content/docs/git?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Vercel automatically deploys supported Git repositories on every branch push and when changes merge into the production
- [Deploying Bitbucket Projects with Vercel](/content/docs/git/vercel-for-bitbucket?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — ​Vercel for Bitbucket automatically deploys your Bitbucket projects with Vercel, providing Preview Deployment URLs, and
- [Deploying GitHub Projects with Vercel](/content/docs/git/vercel-for-github?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Vercel for GitHub automatically deploys your GitHub projects with Vercel, providing Preview Deployment URLs, and automat
- [Deploying GitLab Projects with Vercel](/content/docs/git/vercel-for-gitlab?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — ​Vercel for GitLab automatically deploys your GitLab projects with Vercel, providing Preview Deployment URLs, and automa
- [System Headers](/content/docs/headers?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — This reference covers the list of request, response, cache-control, and custom response headers included with deployment
- [Image Optimization with Vercel](/content/docs/image-optimization?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Transform and optimize images to improve page load performance.
- [Incremental Static Regeneration \\(ISR\\)](/content/docs/incremental-static-regeneration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — ISR serves cached static pages while regenerating content in the background. Vercel\\\
- [Using Monorepos](/content/docs/monorepos?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Vercel provides support for monorepos. Learn how to deploy a monorepo here.
- [Secure Compute](/content/docs/networking/secure-compute?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Secure Compute provides dedicated private networks with VPC peering for Enterprise teams.
- [Project settings](/content/docs/project-configuration/project-settings?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Use the project settings, to configure custom domains, environment variables, Git, integrations, deployment protection,
- [Projects overview](/content/docs/projects?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — A project is where you deploy and operate frontend apps, APIs, backends, containers, and agent workloads on Vercel.
- [Global network and regions](/content/docs/regions?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — View the list of regions supported by Vercel's CDN and learn about our global infrastructure.
- [Routing Middleware](/content/docs/routing-middleware?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how you can use Routing Middleware, code that executes before a request is processed on a site, to provide speed a
- [Routing Middleware API](/content/docs/routing-middleware/api?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how you can use Routing Middleware, code that executes before a request is processed on a site, to provide speed a
- [Redirects](/content/docs/routing/redirects?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to use redirects on Vercel to instruct Vercel's platform to redirect incoming requests to a new URL.
- [Bulk Redirects](/content/docs/routing/redirects/bulk-redirects?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to import thousands of simple redirects from CSV, JSON, or JSONL files.
- [Rewrites on Vercel](/content/docs/routing/rewrites?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to use rewrites to send users to different URLs without modifying the visible URL.
- [Services](/content/docs/services?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Deploy multiple backends and frontends within a single Vercel project using services.
- [Services routing](/content/docs/services/routing?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how Vercel routes public requests to services and how each service handles its own routes.
- [WAF Custom Rules](/content/docs/vercel-firewall/vercel-waf/custom-rules?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how to add and manage custom rules to configure the Vercel Web Application Firewall \\(WAF\\).
- [Enhancing Security for Redirects and Rewrites](/content/kb/guide/enhancing-security-for-redirects-and-rewrites?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Learn how security measures in URI handling can prevent semantic attacks, where malicious hosts exploit redirects and re
- [Vercel Pricing](/content/pricing?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=outbound&surface=html/index.html) — Choose a Vercel plan and compare features and usage pricing.

### Pages that link here (57)

By site: vercel-changelog (1) · vercel-kb (12) · vercel-docs (44)

#### From vercel-changelog

- [Server-Timing response headers will pass through to the client](/content/changelog/server-timing-header?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html)

#### From vercel-kb

- [Are Vercel Preview Deployments indexed by search engines?](/content/kb/guide/are-vercel-preview-deployment-indexed-by-search-engines?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Vercel Preview Deployments aren't indexed by default. Learn how the noindex header works, how to confirm it, and the cus
- [Build Claude Managed Agents with Vercel Services](/content/kb/guide/claude-managed-agents-vercel-services?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Deploy Claude Managed Agents with Vercel Services to run a streaming research analyst in a browser chat, using Anthropic
- [Deploy a Node.js Fastify app on Vercel with Docker](/content/kb/guide/deploy-nodejs-on-vercel-with-docker?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Build a Node.js application with Fastify and Docker, then deploy it to Vercel Functions. Learn how to configure environm
- [Deploy Rust on Vercel with Docker](/content/kb/guide/deploy-rust-on-vercel-with-docker?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Build a Rust application with Axum and Docker, then deploy it to Vercel Functions. Learn how to configure environment va
- [Deploy ASP.NET Core on Vercel with Docker](/content/kb/guide/dot-net-asp-net-on-vercel-with-docker?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Build a .NET application with Docker and deploy it to Vercel Functions. Learn how to configure environment variables, in
- [Conditional Build Commands: Environment, Branch, and Custom Workflows](/content/kb/guide/dynamic-build-commands?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Run a different Vercel build command for each environment or Git branch using a shell script, vercel.json, or vercel.ts,
- [Full-stack previews on Vercel](/content/kb/guide/full-stack-preview-deployments-on-vercel?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to use full-stack previews for your Vercel projects. Deploy Next.js, FastAPI, and a containerized Go service t
- [Manage cache tags for external origins](/content/kb/guide/how-to-manage-cache-tags-for-external-origins?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to use cache tags to optimally serve fresh content on Vercel when content from your external origin changes
- [Translate Kubernetes manifests to vercel.json](/content/kb/guide/kubernetes-manifests-to-vercel-json?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Translate Kubernetes Deployments, Services, Ingress, ConfigMaps, and CronJobs into vercel.json configuration and Vercel
- [Deploy Laravel on Vercel with Docker](/content/kb/guide/laravel-php-with-docker?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Build a Laravel application with FrankenPHP and Docker, then deploy it to Vercel with production configuration, external
- [Deploy Symfony on Vercel with Docker](/content/kb/guide/symfony-php-with-docker?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Build a Symfony application with FrankenPHP and Docker, then deploy it to Vercel with production configuration, external
- [Can I use Vercel as a reverse proxy?](/content/kb/guide/vercel-reverse-proxy-rewrites-external?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to use rewrites to proxy requests from Vercel to other deployments.

#### From vercel-docs

- [Build Output Configuration](/content/docs/build-output-api/configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about the Build Output Configuration file, which is used to configure the behavior of a Deployment.
- [Features](/content/docs/build-output-api/features?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to implement common Vercel platform features through the Build Output API.
- [Build image overview](/content/docs/builds/build-image?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about the container image used for Vercel builds.
- [Configuring a Build](/content/docs/builds/configure-a-build?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Vercel automatically configures the build settings for many front-end frameworks, but you can also customize the build a
- [Cache-Control headers](/content/docs/caching/cache-control-headers?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about the cache-control headers sent to each Vercel deployment and how to use them to control the caching behavior
- [Getting started with cron jobs](/content/docs/cron-jobs/quickstart?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to schedule cron jobs to run at specific times or intervals.
- [Optimize Deployment Storage](/content/docs/deployment-storage/optimize?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Set retention periods, review remaining usage, and reduce deployment output size.
- [Log Drains Reference](/content/docs/drains/reference/logs?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about Log Drains - data formats, sources, environments, and security configuration.
- [Fluid compute](/content/docs/fluid-compute?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about fluid compute, an execution model for Vercel Functions that provides a more flexible and efficient way to ru
- [Vite on Vercel](/content/docs/frameworks/frontend/vite?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Deploy Vite projects to Vercel and configure environment variables, Vercel Functions, server-side rendering, and SPA rew
- [Deploy a Django app on Vercel](/content/docs/frameworks/full-stack/django?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Deploy a Django app on Vercel. Learn how the Python runtime, WSGI, ASGI, static assets, and Vercel Functions work togeth
- [Configuring Functions](/content/docs/functions/configuring-functions?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to configure the runtime, region, maximum duration, and memory for Vercel Functions.
- [Advanced Configuration](/content/docs/functions/configuring-functions/advanced-configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to add utility files to the /api directory, and bundle Vercel Functions.
- [Configuring Maximum Duration for Vercel Functions](/content/docs/functions/configuring-functions/duration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to set the maximum duration of a Vercel Function.
- [Configuring regions for Vercel Functions](/content/docs/functions/configuring-functions/region?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to configure regions for Vercel Functions.
- [Functions API Reference](/content/docs/functions/functions-api-reference?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about available APIs when working with Vercel Functions.
- [Vercel Functions Limits](/content/docs/functions/limitations?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about the limits and restrictions of using Vercel Functions.
- [Runtimes](/content/docs/functions/runtimes?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Runtimes transform your source code into Functions, which are served by our CDN. Learn about the official runtimes suppo
- [Using the Bun Runtime with Vercel Functions](/content/docs/functions/runtimes/bun?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to use the Bun runtime with Vercel Functions to create fast, efficient functions.
- [Using the Go Runtime with Vercel Functions](/content/docs/functions/runtimes/go?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to use the Go runtime to run Go APIs on Vercel.
- [Python Functions in the /api Directory](/content/docs/functions/runtimes/python/api-directory?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Configure existing Vercel projects that use file-based Python functions in an /api directory.
- [System Headers](/content/docs/headers?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — This reference covers the list of request, response, cache-control, and custom response headers included with deployment
- [Response headers](/content/docs/headers/response-headers?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn about the response headers sent to each Vercel deployment and how to use them to process responses before sending
- [Limits](/content/docs/limits?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Look up account limits, usage summaries, rate limits, and resource constraints for every Vercel plan.
- [Monorepos FAQ](/content/docs/monorepos/monorepo-faq?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn the answer to common questions about deploying monorepos on Vercel.
- [Package Managers](/content/docs/package-managers?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Discover the package managers supported by Vercel for dependency management. Learn how Vercel detects and uses npm, Yarn
- [Project Configuration](/content/docs/project-configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to configure your Vercel projects using vercel.json, vercel.toml, vercel.ts, or the dashboard to control build
- [Git Configuration](/content/docs/project-configuration/git-configuration?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to configure Git for your project through vercel.json or vercel.ts.
- [Security settings](/content/docs/project-configuration/security-settings?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Configure security settings for your Vercel project, including Logs and Source Protection, Vercel Support Code Visibilit
- [Static Configuration with vercel.toml](/content/docs/project-configuration/vercel-toml?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Configure your Vercel project with a TOML file using the same properties as vercel.json.
- [Programmatic Configuration with vercel.ts](/content/docs/project-configuration/vercel-ts?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Define your Vercel configuration in vercel.ts with @vercel/config for type-safe routing and build settings.
- [Projects overview](/content/docs/projects?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — A project is where you deploy and operate frontend apps, APIs, backends, containers, and agent workloads on Vercel.
- [Transferring a project](/content/docs/projects/transferring-projects?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to transfer a project between Vercel teams.
- [Monitoring Reference](/content/docs/query/monitoring/monitoring-reference?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — This reference covers the clauses, fields, and variables used to create a Monitoring query.
- [Routing](/content/docs/routing?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how Vercel's CDN routes requests through firewall, project routes, and deployment routes before reaching your appl
- [Routing Middleware](/content/docs/routing-middleware?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how you can use Routing Middleware, code that executes before a request is processed on a site, to provide speed a
- [Routing Middleware API](/content/docs/routing-middleware/api?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how you can use Routing Middleware, code that executes before a request is processed on a site, to provide speed a
- [Getting Started with Routing Middleware](/content/docs/routing-middleware/getting-started?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how you can use Routing Middleware, code that executes before a request is processed on a site, to provide speed a
- [Bulk Redirects](/content/docs/routing/redirects/bulk-redirects?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to import thousands of simple redirects from CSV, JSON, or JSONL files.
- [Getting Started](/content/docs/routing/redirects/bulk-redirects/getting-started?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to import thousands of simple redirects from CSV, JSON, or JSONL files.
- [Rewrites on Vercel](/content/docs/routing/rewrites?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to use rewrites to send users to different URLs without modifying the visible URL.
- [Service configuration reference](/content/docs/services/config-reference?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Options available for service configuration.
- [Services routing](/content/docs/services/routing?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how Vercel routes public requests to services and how each service handles its own routes.
- [WAF Custom Rules](/content/docs/vercel-firewall/vercel-waf/custom-rules?from=graph&source_path=%2Fdocs%2Fproject-configuration%2Fvercel-json&source_site=vercel-docs&relationship=inbound&surface=html/index.html) — Learn how to add and manage custom rules to configure the Vercel Web Application Firewall \\(WAF\\).

* * *

[Previous\\
\\
Project Configuration](/content/docs/project-configuration/index.html)

[Next\\
\\
vercel.toml](/content/docs/project-configuration/vercel-toml/index.html)

Was this helpful?

supported.

Send
