SiteTidy
Home /Tools /Vercel Redirect Generator

Vercel Redirect Generator

Create valid vercel.json redirect configurations including regex path matching and query string evaluations.

Vercel Redirect Config

Generate JSON configuration for standard, wildcard, and query-based routing in Vercel.

Rule Builder

/
/

vercel.json

{
  "redirects": [
    {
      "source": "/about-us",
      "destination": "/about",
      "permanent": true
    }
  ]
}

How do Vercel Redirects work?

Vercel handles redirects natively at the Edge. This means redirects happen incredibly fast before any of your Serverless Functions or static files are hit.

To configure redirects, you can use a vercel.json file in the root of your repository. If you are using a framework like Next.js, Nuxt, or SvelteKit, you can also define redirects within their respective configuration files (e.g. next.config.js). The JSON syntax generated by this tool is specifically for vercel.json.

Important Vercel specific behaviors:

  • Permanent Redirects (308 vs 301): Vercel uses the modern HTTP 308 Permanent Redirect status code for permanent redirects instead of 301, and 307 Temporary Redirect instead of 302. 308 and 307 are preferred because they strictly preserve the HTTP method (e.g., a POST request won't accidentally be downgraded to a GET).
  • PCRE Regex: Vercel uses PCRE (Perl Compatible Regular Expressions) for the source path. This allows powerful routing like capture groups /(.*) or named capture groups /(?<id>.*).
  • Query Strings: Unlike traditional servers (Nginx/Apache), query strings are evaluated separately using the has or missing array properties, making it very easy to redirect based on the presence of a specific ?key=value pair.

Related Guides

Deepen your understanding with our expert articles.