---
title: How to stop traffic to an old deployment on Vercel
description: Move production traffic to the new deployment, restrict access to the old deployment, and check remaining function activity and background work.
url: "https://vercel.com/kb/guide/how-to-stop-traffic-to-an-old-deployment-on-vercel"
published: 2026-11-17
last_updated: 2026-11-17
authors: Nick Vigier
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest kb search "<query>"
read_with_vercel_cli: "npx vercel@latest kb inspect how-to-stop-traffic-to-an-old-deployment-on-vercel"
---

When you promote a replacement deployment, Vercel moves your production domains to it, and new requests to those domains are routed to the replacement. Vercel doesn’t shut down the old deployment. It can still receive requests through:

- **Generated deployment URLs and aliases** that point to the old deployment directly.
  
- [**Skew Protection**](https://vercel.com/docs/skew-protection), which can route requests from clients that loaded the old version back to the old deployment.
  
- **Scheduled and background work.** A Cron Job that runs during the promotion can reach the old deployment, and retries from Vercel Queues and resumptions from Vercel Workflows keep creating invocations there. Each retry or resumption is a new invocation, so one function’s duration limit doesn’t bound how long this work continues.
  

Vercel Function invocations already in progress keep running until they finish or reach their [duration limit](https://vercel.com/docs/functions/limitations#max-duration).

This guide helps you stop new invocations to an old deployment, account for work already in progress, and check for continuing activity. For an ordinary release, follow the [promotion workflow](https://vercel.com/docs/deployments/promoting-a-deployment) instead.

## Prerequisites

Before you begin, ensure you have:

- Access to promote deployments, configure Deployment Protection, and delete the old deployments.
  
- Access to the application's schedulers, queue consumers, Workflow runs, and external integrations.
  
- A tested replacement deployment and a rollback plan.
  
- The latest [Vercel CLI](https://vercel.com/docs/cli) installed.
  

## Steps

### 1\. Record the old deployment's limits and request sources

Record the IDs and URLs of the old deployment you are retiring and the replacement deployment you will promote.

List every source of new invocations: production domains, generated deployment URLs, other aliases, pinned clients, authenticated or bypass callers, Cron Jobs, Schedules, Queues, Workflows, and external schedulers or webhooks. These steps address each source before you start the wait.

Inspect the old deployment's effective function configuration using the Vercel CLI:

```bash
vercel inspect "<old-deployment-url>" --json
```

The JSON output reports each function's duration limit as `timeout`. Record the largest applicable value as your waiting period. Inspect the deployed configuration rather than relying on current project settings or source code, which may have changed since that deployment was built.

The maximum duration limits how long an invocation can run before Vercel terminates it. For request handlers, this includes processing the request and sending the response, including streamed responses.

For supported Fluid compute functions, Pro and Enterprise have a 300-second default and an 800-second maximum. Supported Node.js, Bun, and Python versions can use an extended maximum of 1,800 seconds in beta, configured per function. Other execution modes and runtimes have different limits; check the old deployment against the [duration documentation](https://vercel.com/docs/functions/configuring-functions/duration).

Include any [Edge runtime functions](https://vercel.com/docs/functions/limitations#edge-runtime) in your duration inventory; their streaming limit is documented separately. Existing [WebSocket connections](https://vercel.com/docs/functions/websockets) can remain on the old deployment until they close and are bounded by the function's maximum duration.

### 2\. Move production traffic to the replacement

Open the project's **Deployments** page and promote the replacement using the appropriate [promotion flow](https://vercel.com/docs/deployments/promoting-a-deployment). A staged production build can be promoted without rebuilding. Promoting a preview deployment creates a production build using production environment variables, so verify the resulting deployment ID.

Wait for the promotion to finish and confirm that the replacement is **Current**. From a linked project directory, you can check pending [promotion status](https://vercel.com/docs/cli/promote#status) with:

```bash
vercel promote status
```

If [Rolling Releases](https://vercel.com/docs/rolling-releases) is enabled, complete the rollout to 100%. Changing the release configuration does not complete an active rollout.

Check every production domain and test a representative action in your application. Confirm the serving deployment through your application's release marker or the corresponding deployment logs. If the replacement fails these checks, resolve the failure or use your rollback plan before retiring the old deployment.

### 3\. Restrict access to the old deployment

#### Protect generated deployment URLs

[Deployment Protection](https://vercel.com/docs/deployment-protection) settings apply to the project. Before changing them, check how they affect the replacement and applications fetching through `VERCEL_URL` or `VERCEL_BRANCH_URL`.

In the project's **Settings**, open **Deployment Protection**. Select a protection method and a scope that covers the old deployment's generated URLs.

- [**Standard Protection**](https://vercel.com/docs/deployment-protection#standard-protection) protects generated deployment URLs while leaving production domains public.
  
- **All Deployments** protects production domains too.
  
- **Legacy protection** scopes may leave past production deployments accessible, so check the selected scope explicitly.
  

Protection permits authorized access. Review callers using Vercel Authentication, Trusted Sources, automation [bypass secrets](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection), shareable links, Deployment Protection Exceptions, or an OPTIONS allowlist. Stop or retarget integrations that still call the old deployment. Review other domains and aliases in your inventory as well.

#### Exclude the old deployment from Skew Protection

> [Skew Protection](https://vercel.com/docs/skew-protection) is available on Pro and Enterprise. On Hobby, skip this subsection.

If Skew Protection is enabled, framework requests can carry an old deployment ID in `?dpl=`, an `x-deployment-id` header, or a `__vdpl` cookie. Those requests can select the previous deployment after production moves.

Skew Protection's default maximum age is 12 hours on Pro and one day on Enterprise, measured from deployment creation. For requests from Googlebot and Bingbot, Vercel automatically adjusts the maximum age to 60 days. You can configure maximum age up to the project's Deployment Retention limit.

Set a [Custom Skew Protection Threshold](https://vercel.com/docs/skew-protection#custom-skew-protection-threshold) at the replacement:

1. Open the replacement deployment in **Deployments**.
   
2. Open the actions menu near **Visit**.
   
3. Select **Skew Protection Threshold**, then **Set**.
   

The threshold excludes older deployments from serving skew-pinned requests. Test a framework-managed request from an already-open client and check which deployment handles it. A hard refresh alone does not test this path, because [top-level document navigation uses](https://vercel.com/docs/skew-protection#document-navigations) [the latest production deployment](https://vercel.com/docs/skew-protection#document-navigations).

### 4\. Check scheduled jobs and background work

#### Cron Jobs, Vercel Schedules, and external integrations

Vercel moves production domains before it repoints Cron Jobs. A scheduled run during that gap can still reach the previous deployment or be skipped. Jobs already running also continue after a new deployment. Include them in the handover rather than assuming promotion completed it. See [Cron Jobs during promotions](https://vercel.com/docs/schedules/cron-jobs/manage-cron-jobs#scheduled-runs-during-a-promotion-or-rollback).

For [Vercel Schedules](https://vercel.com/docs/schedules/concepts#deployments-promotions-and-rollbacks), select the relevant environment or branch and inspect the target and execution history. Follow the same checks for external schedulers and webhook senders. Record any schedules or integrations that need to resume.

#### Queues

In push mode, messages stay associated with the deployment that published them. Promotion does not stop old consumer invocations or retries. Consumers are private and invoked internally, so public URL protection does not cover this source of work.

Choose whether the old deployment's messages should finish processing or delivery should stop. If delivery must stop, follow [stopping consumer invocations](https://vercel.com/docs/queues/concepts#stopping-deliveries-to-a-deployment). Pending messages remain until expiry.

If you use Queues in poll mode, check the consumers and versioning you control separately.

#### Workflows

[Workflow runs stay on the deployment that created them](https://vercel.com/docs/workflows/concepts#skew-protection). Retries can create new invocations there, and a workflow's overall lifetime is not bounded by one function's `maxDuration`.

In **Observability**, open **Workflows** and identify runs associated with the old deployment. Let required runs finish or cancel the runs that must stop. If you delete the deployment, cancel its remaining runs too. Runs pinned to a deleted deployment do not complete or fail on their own.

#### Daemons

If your application uses Daemons, verify that instances from the previous production deployment have stopped before continuing maintenance. During a rollout, old and new instances briefly run together. Old instances receive `SIGTERM` and should stop accepting new work while finishing work in progress during the shutdown grace period. Check daemon shutdown separately from the function-duration wait in step 6. See [the daemon rollout and shutdown lifecycle](https://vercel.com/docs/daemons/managing-daemons#deploying-changes-to-a-daemon).

### 5\. Retain or delete the old deployment

#### Retain it for rollback

Keep the access restrictions and threshold in place, and account for all authorized callers and background work identified above. A retained, protected deployment remains invocable by permitted callers. If those callers cannot be stopped, you have restricted access without fully retiring the deployment.

#### Delete it to stop future invocations

First, confirm the replacement is healthy. Deleting the deployment removes it as an [Instant Rollback target](https://vercel.com/docs/deployments/managing-deployments#delete-a-deployment), so confirm that you accept losing that option.

If an operation must finish before retirement, confirm its result in application state before deleting. Deleting the deployment does not confirm that an operation already in progress completed successfully or that an external operation was canceled.

> **Warning:**
>
> Deleted deployments [cannot be selected through Skew Protection](https://vercel.com/docs/skew-protection#limitations).

In the Vercel dashboard, open your project's **Deployments** page, select the old deployment, verify its ID, then open the actions menu and select **Delete**.

For automated deletion, you can also use the [Delete a Deployment API](https://vercel.com/docs/rest-api/deployments/delete-a-deployment).

Or, use the CLI:

```bash
vercel remove "<old-deployment-url>"
```

Pass the exact deployment URL.

> **Warning:**
>
> Passing a project name to `vercel remove` can remove the project and its deployments. See the [command reference](https://vercel.com/docs/cli/remove).

### 6\. Verify request sources and wait

Use a harmless application route and correlate requests with deployment logs or a release marker. Complete the applicable checks below:

| Source                               | Evidence to check                                                                                                                                        |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Production domains                   | The replacement is Current, the rolling rollout is complete, and representative requests reach it.                                                       |
| Old generated URLs and other aliases | The old application is unavailable to the intended callers, or the deployment has been deleted. Check authorized callers separately from anonymous ones. |
| Old client pins                      | A real framework-managed request no longer selects the old deployment.                                                                                   |
| Scheduled work and integrations      | Callers have moved or paused, transition-period runs have been accounted for, and targets have been checked.                                             |
| Queues and Workflows                 | Required work has finished, or the applicable retirement and cancellation actions are complete.                                                          |
| Daemons                              | Instances from the previous production deployment have stopped, and the required work has been completed or reconciled.                                  |

For anonymous URL checks, use ordinary HTTP without authentication or bypass credentials. [`vercel curl`](https://vercel.com/docs/cli/curl) automatically supplies bypass access. An authentication page, redirect, or cached static response is not evidence that an old function executed.

Start the wait only after the identified sources of new invocations have stopped. If a retained deployment still has active callers, stop or retarget them, or choose deletion before proceeding.

#### Record the cutoff and wait

Record a UTC cutoff time after completing these checks. From that point, wait at least the longest applicable function duration recorded in [step 1](#1.-record-the-old-deployment%27s-limits-and-request-sources). For example, if the limit is 800 seconds, wait at least 801 seconds.

This calculation applies to invocations already in progress once new invocations have stopped. Registered [Next.js](https://nextjs.org/docs/app/api-reference/functions/after) [`after()`](https://nextjs.org/docs/app/api-reference/functions/after) and [`waitUntil()`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package#waituntil) work shares the invocation's duration limit.

With Fluid compute, Vercel can [reuse function instances and process multiple invocations in one instance](https://vercel.com/docs/functions/configuring-functions/duration#consequences-of-changing-the-maximum-duration). Instance reuse does not remove the need to register required post-response work.

If your cutover requires only the replacement deployment to write to a shared database, enforce that write ownership in your application or database. Traffic restrictions and quiet logs alone do not establish that earlier database operations have finished.

### 7\. Check for continuing activity

Vercel does not provide a deployment-wide completion signal. These checks help identify continuing activity; an empty log view alone does not establish that all work has ended.

In the Vercel dashboard, open **Logs**, filter by the old deployment, and select a time range covering the cutover and waiting period. Use dashboard **Live mode** to watch for further activity.

In [Observability Query](https://vercel.com/docs/query/reference), review Function Invocations and function duration filtered or grouped by deployment ID. Available history and query fields depend on your plan.

With the current CLI, query runtime logs and CDN request records separately:

```bash
vercel logs runtime --project "<project>" --deployment "<old-deployment-id>" --since "<cutoff-UTC-time>" --limit 1000
vercel logs requests --project "<project>" --deployment "<old-deployment-id>" --since "<cutoff-UTC-time>" --limit 1000
```

Use an ISO 8601 timestamp such as `2026-11-17T10:00:00Z` for the cutoff. Follow any returned **Next page** command so truncated results do not hide activity. CLI queries return a limited set of results; they do not continuously stream. To learn more, see [Runtime Logs](https://vercel.com/docs/logs/runtime) and [`vercel logs`](https://vercel.com/docs/cli/logs).

Check invocation timing, duration, errors, and application task results. A successful HTTP response does not establish that registered post-response work finished successfully. Look for `FUNCTION_INVOCATION_TIMEOUT` to identify invocations that exceeded their duration limit. Work scheduled after a response cannot change the status that has already been delivered to the client.

If a new invocation starts later, investigate its source, close that path, and record a new cutoff time as described in [step 6](#6.-verify-request-sources-and-wait). A delayed log from an invocation that started before the cutoff is different from a new invocation. Inspect the request's timing before restarting the wait.

After the applicable waiting period has elapsed, confirm that activity checks show no unexplained new invocations. Reconcile database writes, external jobs, queued messages, and webhook deliveries in the systems that own them. Ending an invocation does not roll back effects already committed or work already accepted by another system.

## Troubleshooting

| What you observe                                                    | What to check                                                                                                |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Requests still reach the old deployment through a production domain | Promotion status, active Rolling Releases, Skew Protection, and domain assignments.                          |
| The old generated URL still opens the app                           | Protection scope, your authenticated session, and configured bypass access.                                  |
| Function activity continues without public requests                 | Deployment-pinned queue deliveries, Workflow retries, private schedule targets, and external callers.        |
| Only old static assets appear in request records                    | Check evidence of function invocation before treating asset requests as the execution of old code.           |
| Scheduled jobs do not resume after promotion                        | Check whether Cron Jobs or individual schedules remain disabled; their state can persist across deployments. |

## Next steps

- Learn how to [redeploy and delete deployments](https://vercel.com/docs/deployments/managing-deployments)
  
- Control [who can reach your deployment URLs](https://vercel.com/docs/deployment-protection)
  
- Keep [clients and servers on the same deployment](https://vercel.com/docs/skew-protection)
  
- Set [how long your functions can run](https://vercel.com/docs/functions/configuring-functions/duration)
  
- Explore [`waitUntil()`](https://vercel.com/docs/functions/functions-api-reference) [and other Vercel Functions helpers](https://vercel.com/docs/functions/functions-api-reference)
  
- Schedule work after a response with [Next.js](https://nextjs.org/docs/app/api-reference/functions/after) [`after()`](https://nextjs.org/docs/app/api-reference/functions/after)
  

## FAQ

### Why is my old Vercel deployment still receiving requests after a new deployment?

Promoting a deployment does not close every way to reach the previous one. Its generated URL may remain accessible, Skew Protection can route existing clients to it, and deployment-pinned Queues or Workflows can continue triggering invocations. An active Rolling Release can also intentionally keep traffic on the old deployment.

### How do I stop traffic to an old deployment on Vercel?

Complete the replacement's production rollout, address direct URLs and authorized callers, and exclude the old deployment from Skew Protection where applicable. Check scheduled jobs, queue consumers, and Workflow runs separately. If you delete the old deployment to retire it, first account for unfinished work and the loss of Instant Rollback.

### Does Vercel Deployment Protection block all requests to an old deployment?

Deployment Protection restricts access but does not disable the deployment. Authorized users and callers using configured [bypass mechanisms](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection) can still reach it. Review automation secrets, Trusted Sources, shareable links, protection exceptions, and allowed OPTIONS requests before you consider access closed.

### How long should I wait for old Vercel Functions to finish after a cutover?

After stopping new invocations, wait at least the longest applicable function duration configured in the old deployment. Inspect its effective settings with `vercel inspect <old-deployment-url> --json`. Queue retries and Workflow resumptions can trigger later invocations, so promotion time alone is not a reliable starting point. See [function duration configuration](https://vercel.com/docs/functions/configuring-functions/duration).

### Can I use Instant Rollback after deleting a Vercel deployment?

A deleted deployment cannot be an Instant Rollback target. Before [deleting it](https://vercel.com/docs/deployments/managing-deployments#delete-a-deployment), verify the replacement and decide whether you still need the previous deployment for recovery. Retaining it preserves that option, but you must continue controlling its access and background work.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```
