Skip to content

What is header bidding?

Short answer

Header bidding is an auction that runs in the browser before the ad server is called. A snippet in the page head asks several demand partners for a price at the same time, waits a fixed timeout, then passes the winning bids to the ad server as targeting values. The ad server compares them against direct-sold campaigns and picks the highest.

Last updated Beginner

Header bidding is sometimes called pre-bidding or advance bidding. All three names describe the same thing: asking buyers what they will pay *before* you decide who gets to show an ad, instead of after.

The name comes from where the code originally went — the <head> of the page. That is still the recommended place, because the auction needs to start as early as possible.

The five steps of a header bidding auction

  1. 1 The page loads and a small JavaScript library initialises. It knows which ad placements exist on the page and which demand partners to ask about each one.
  2. 2 It sends bid requests to every partner simultaneously. Parallel is the whole point — a waterfall asks one partner at a time and pays for it in latency.
  3. 3 It waits. Not for all the answers, but for a fixed timeout, typically somewhere between 800 and 2,000 milliseconds. Anyone who has not answered by then has lost by default.
  4. 4 The highest bid per placement is written onto the ad server request as key-value targeting: usually a bidder name and a price bucket.
  5. 5 The ad server runs its own decision. It weighs the header bidding price against direct-sold line items and its own exchange demand, and serves whichever is worth most.

What the pieces are called

  • Wrapper — the library that orchestrates the auction. Prebid.js is the open-source standard and runs on the large majority of header bidding sites.
  • Adapter — a small piece of code per demand partner that translates the generic bid request into whatever that partner's API expects.
  • Bidder / SSP — the demand partner itself. Each one has its own contract, its own payment terms and its own reporting.
  • Ad unit — one auctionable placement. It maps to a slot on your page and to an ad unit path in your ad server.
  • Price bucket — bids are rounded into granular steps (for example every $0.01 up to $5) because ad servers cannot compare arbitrary floating point values in targeting.

Why it replaced the waterfall

Before header bidding, publishers ranked their demand partners by historical average CPM and offered impressions to each in turn until one accepted. That model has two structural flaws. First, historical averages are a bad predictor of what a specific impression is worth to a specific buyer right now. Second, every partner you ask adds a round trip, so the deeper the waterfall goes, the slower the page and the more users leave before the ad renders.

A simultaneous auction fixes both. Every partner sees every impression and prices it individually, and asking ten partners costs roughly the same wall-clock time as asking one.

What header bidding does not do

It does not create demand. If no buyer wants your audience, running a cleaner auction will not change that. It does not replace your ad server, and it does not replace your direct sales team — direct-sold campaigns still win when they are priced above the market.

It also is not free. The auction costs you page speed, and page speed costs you revenue too. Getting the trade-off right is most of the work, which is why timeouts and lazy loading get their own articles here.

Related questions

Is header bidding the same as Prebid?

No. Header bidding is the technique; Prebid.js is the most widely used open-source library that implements it. You can run header bidding without Prebid — Amazon TAM is a separate implementation, and some vendors ship their own wrapper — but Prebid is the de facto standard and the reference implementation most bidders build against.

Does header bidding work with Google Ad Manager?

Yes, and Google Ad Manager is the most common setup. Header bidding results are passed to Ad Manager as key-value targeting on the ad request, and you create price-priority line items that read those values. Ad Manager then compares the header bidding price against your direct campaigns and its own demand in a unified decision.

How much revenue does header bidding add?

Published case studies commonly report double-digit percentage increases in programmatic CPM versus a waterfall, but the honest answer is that it depends entirely on what you are replacing. Moving from a deep waterfall to a clean parallel auction usually helps a lot. Moving from one competent header bidding setup to another usually helps much less.

Do I need my own SSP contracts for header bidding?

For a self-managed setup, yes — each bidder is a direct commercial relationship, and each pays you separately. Some vendors let you run under their seats instead, which is faster to start but means the vendor sits between you and the money. Both models are legitimate; only one keeps the payment relationship yours.

Try it on your own site

Free up to 1 million ad impressions a month. You keep your Ad Manager account and your SSP contracts.

Start free