Docs
Search docs...⌘K

Vercel

Vercel Log Drains send HTTP request logs from your Vercel project to Ahrefs automatically. The connection is made through the Ahrefs integration for Vercel.

Prerequisites

  • A Vercel Pro or Enterprise plan on the team that hosts your project. Log Drains are not available on the Hobby plan.
  • Permission to install integrations on that Vercel team.
  • Your Ahrefs project's domain must be assigned to a project on that team. Ahrefs finds the Vercel project by its domains.

How it works

Setting up Vercel has two parts: connecting a Vercel team to your Ahrefs workspace once, then enabling Bot Analytics on each project you want to monitor.

Step 1 — Connect Vercel to your workspace

  1. In Ahrefs, go to Account settings → Integrations and click Connect Vercel account. You can also start from the project you want to monitor: in Project Settings → Bot Analytics, select Vercel and click Connect with Vercel.
  2. A Vercel window opens. Choose the Vercel team (or your personal account) and which projects Ahrefs may access, then confirm.
  3. You are returned to Ahrefs. The team now appears under Account settings → Integrations → Vercel.

Each Vercel team is connected once and shared by every project in your Ahrefs workspace. Connect the same way again to add another team.

info

Make sure the Vercel project you want to monitor is included in the access you grant to Ahrefs. Ahrefs can only create Log Drains on projects it can see.

Step 2 — Enable Bot Analytics on a project

  1. Go to Project Settings → Bot Analytics for your Ahrefs project.
  2. Select Vercel and click Enable Vercel.

Ahrefs will:

  1. Find the Vercel project whose domains include your Ahrefs project's domain, across your connected teams.
  2. Create a Log Drain on that project named ahrefs-web-analytics-<project id>, delivering request logs to Ahrefs.

If no connected team has a project serving that domain, enabling fails with a message saying so. Check the domain assignment in Vercel or connect the right team first.

Step 3 — Verify the connection

Back in Project Settings → Bot Analytics, the Vercel method shows as connected. Data appears in the Bot Analytics report after the first requests reach your site. You can also see the drain in your Vercel dashboard under the team's Log Drains settings.

What Ahrefs does with the access

  • Reads the list of projects and their domains, to find the project matching your site.
  • Creates, updates and deletes Log Drains on those projects. Ahrefs only manages drains it created.
  • Removes the integration from your team when you disconnect it in Ahrefs.

Disabling and disconnecting

  • Disable a project: in Project Settings → Bot Analytics, disable Vercel. The Log Drain is deleted from your Vercel team.
  • Disconnect a team: in Account settings → Integrations → Vercel, remove the connection. Ahrefs deletes the Log Drains it created for that team, uninstalls the integration from Vercel and discards its access.

info

There is no manual setup for Vercel. Log Drains created outside the Ahrefs integration cannot authenticate with Ahrefs, so always enable Vercel from your project settings.