> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qa.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel Preview

> Configure QA.tech to bypass Vercel deployment protection for automated testing

# Vercel Preview Protection Bypass

When testing Vercel preview deployments that are protected with Password Protection, Vercel Authentication, or Trusted IPs, you need to configure QA.tech to bypass these protection mechanisms. This guide shows you how to set up automated testing with Vercel's Protection Bypass for Automation feature.

<Note>
  This guide is for testing protected Vercel preview deployments from CI/CD pipelines. See [CI/CD Integration](/configuration/ci-cd-integration) for an overview of integrating QA.tech with CI/CD systems.
</Note>

## Overview

Vercel's Protection Bypass for Automation allows automated tools like QA.tech to access protected deployments using a special secret. This bypasses all deployment protection methods including:

* Password Protection
* Vercel Authentication
* Trusted IP restrictions

## Setting Up Vercel Protection Bypass

### Step 1: Enable Protection Bypass in Vercel

<Steps>
  <Step title="Navigate to Project Settings">
    Go to your Vercel project dashboard and navigate to **Settings → Deployment
    Protection**
  </Step>

  <Step title="Enable Protection Bypass">
    Find the **Protection Bypass for Automation** section and enable it. This
    will generate a secret token.
  </Step>

  <Step title="Copy the Secret">
    Copy the generated secret - you'll need this for configuring QA.tech
  </Step>
</Steps>

<Note>
  The secret is automatically added to your Vercel deployments as the
  environment variable `VERCEL_AUTOMATION_BYPASS_SECRET`. Regenerating the
  secret will invalidate previous deployments, requiring a redeploy to use the
  new value.
</Note>

### Step 2: Configure Project URL with Query Parameters

Configure your project URL to include the bypass parameters directly:

<Steps>
  <Step title="Navigate to Project Settings">
    Go to [**Settings → Project
    Settings**](https://app.qa.tech/current-project/settings) in your
    QA.tech project
  </Step>

  <Step title="Update Project URL">
    Modify your project URL to include the bypass query parameters. For example,
    if your Vercel preview URL is:
    `https://example-vercel-protected-git-branch-qa-tech.vercel.app`

    Update it to:
    `https://example-vercel-protected-git-branch-qa-tech.vercel.app?x-vercel-protection-bypass=YOUR_SECRET&x-vercel-set-bypass-cookie=true`

    Replace `YOUR_SECRET` with the secret you copied from Step 1.
  </Step>

  <Step title="Save Configuration">
    Save your project settings. QA.tech will now use this URL format for all
    tests, automatically bypassing Vercel's protection.
  </Step>
</Steps>

<Note>
  When you visit a Vercel URL with these query parameters, Vercel automatically
  redirects to a clean URL without the query parameters after setting the bypass
  cookie. This makes it a clean solution that doesn't require managing custom
  headers.
</Note>

## Query Parameter Configuration Details

### Required Parameters

* **Parameter**: `x-vercel-protection-bypass`

* **Value**: Your generated Vercel secret

* **Purpose**: Bypasses all deployment protection mechanisms

* **Parameter**: `x-vercel-set-bypass-cookie`

* **Value**: `true`

* **Purpose**: Sets a bypass cookie for subsequent requests, ensuring consistent access throughout the test session
