TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is header bidding? How it works vs the waterfall

Header bidding lets several ad buyers bid on the same impression at once before the ad server is called. How it differs from the waterfall, a three-bidder example and its latency cost.

Oliver Reed Reviewed by Emma Collins Also called header bidding Last updated Nov 20, 2026 Glossary

Quick answer

Header bidding is a way for publishers to sell ad slots by asking several demand partners to bid at the same time, before the ad server is called, so the bids compete with the ad server's own demand instead of being tried one by one in a waterfall.

What is header bidding?

Header bidding is a way for a publisher to sell an ad slot in which several demand partners are asked to bid at the same time, before the ad server is called, and the bids then compete with the ad server's own demand. The name comes from where the bidding code is placed: in the <head> of the page, so it runs before the rest of the ad-selling logic.

The alternative is the waterfall, where demand sources are called one after another in a fixed priority order and the first one willing to buy the impression takes it, even if a source further down would have paid more. Header bidding exists to remove that blind spot. This article defines both, works a three-bidder example with numbers you can recompute, and covers the cost that header bidding adds to the page.

How does the waterfall work and where does it lose money?

In a waterfall the publisher ranks demand sources, usually by their historical average price. The ad server asks the first source whether it will fill the impression at or above a price for that tier. If yes, the impression is sold and the rest are never asked. If no, the request "falls" to the next source.

The loss is structural. Prices are set from past averages, not from this impression's real value. A source in tier 1 that bids $1.60 against a $1.50 tier floor wins, even if tier 2 would have paid $1.95 for the same impression. Nobody ever finds out, because tier 2 was never asked. Prebid's documentation describes the traditional model the same way: the process was mostly invisible to the publisher, who could not confirm that they had received the best available price.

How does header bidding work step by step?

The Prebid project's description can be summarised in four steps:

  1. The page loads and the wrapper starts. A library (Prebid is the common open-source one) runs before the ad server is called.
  2. Requests go to all selected bidders at once. Not one at a time. Client-side set-ups typically use 5 to 15 demand partners, and the Prebid ecosystem lists more than 300.
  3. A timeout closes the auction. Any bidder that has not answered by the time limit is left out.
  4. The ad server makes the final decision. The winning header bid (or bids) are passed to the ad server, where they compete with its own line items, such as direct deals. Alternatively the library can pick the winner itself.

Two consequences are worth stating plainly. The publisher chooses which suppliers may bid. And because bid collection happens before the ad server is called, it adds some latency by design.

What does a three-bidder auction look like?

Sample data: six impressions of the same slot. Three bidders (A, B and C) would pay the CPMs shown. In the waterfall, the tiers are A, then B, then C, with tier floors of $1.50, $1.20 and $0.80, so the first tier whose bid meets its floor takes the impression. In header bidding, all bids arrive together and the highest wins. On impression 5, bidder C answered after the timeout, so it is excluded.

ImpressionBid ABid BBid CWaterfall winner (price)Header bidding winner (price)
1$1.60$1.95$1.40A ($1.60)B ($1.95)
2$1.10$1.65$1.35B ($1.65)B ($1.65)
3$1.75$1.70$1.00A ($1.75)A ($1.75)
4$0.90$1.05$1.25C ($1.25)C ($1.25)
5$1.55$1.20too lateA ($1.55)A ($1.55)
6$1.45$0.95$0.85C ($0.85)A ($1.45)
Sum of CPMs$8.65$9.60

The average CPM is $8.65 ÷ 6 = $1.44 in the waterfall and $9.60 ÷ 6 = $1.60 with header bidding, an increase of 11.0%. The two models agree on 4 of the 6 impressions. The whole difference comes from impression 1 (A cleared its tier floor and shut out B) and impression 6 (A's $1.45 missed its $1.50 floor, so the impression fell all the way to C at $0.85). Those are the cases the waterfall cannot see.

The sample is small and the bids were chosen to show the mechanism; it is not a prediction of uplift. Real gains depend on how many bidders you add, how your tier floors were set and how many bids miss the timeout.

How are header bids turned into ad server line items?

The ad server compares header bids with its own demand using a price bucket. Prebid rounds each bid down to a bucket, and the bucket value is passed as the hb_pb key-value that your line items target. Prebid's default granularity is "medium": $0.10 steps, capped at $20.

GranularityStepCap
low$0.50$5
medium (default)$0.10$20
high$0.01$20
auto$0.05 up to $5, $0.10 from $5 to $10, $0.50 from $10 to $20$20
dense$0.01 up to $3, $0.05 from $3 to $8, $0.50 from $8 to $20$20

In the example, bid B on impression 1 ($1.95) lands in the $1.90 bucket under "medium", and A's $1.75 lands in $1.70. A direct deal line item worth $1.92 would beat the $1.90 bucket even though the bid was $1.95, which is the cost of coarse buckets. Prebid's documentation says rounding affects only the ad server's auction, not what is paid: a $2.75 bid rounded to $2.50 that wins still pays $2.75. If your price distribution is mostly under $3, a finer granularity such as "dense" loses less to rounding, at the price of more line items to maintain.

What is the difference between client-side and server-side header bidding?

Client-sideServer-side
Where auction requests are sent fromThe visitor's browser, one request per bidderA server: the browser sends one request and the server contacts the bidders
Typical number of partners (Prebid)About 5 to 15Not stated in the overview
Usual reason to choose itSimplest set-up, bidders see the browser directlyFewer browser requests, so less page latency

Prebid can run auctions client-side or through Prebid Server. Many publishers combine the two.

What does header bidding cost the page?

It adds waiting time. A measurement study presented at ACM IMC 2019 (Pachilakis and others) crawled about 35,000 top websites and analysed roughly 800,000 auctions. It found header bidding on 14.28% of those sites, and that its latency could be up to 3 times that of the waterfall in the median case. The data is from 2019, so treat the percentages as a historical snapshot and the 3× as an upper range, not a forecast for your site.

The timeout is the dial. A short timeout protects the page and loses slow bidders; a long one keeps more bids and delays the ad. Sample data: you log how many bids arrive within each timeout and the average winning CPM.

TimeoutBids arriving in timeAverage winning CPMGain over the previous row
500 ms71%$1.31
800 ms90%$1.52+$0.21
1,000 ms95%$1.58+$0.06
1,500 ms98%$1.60+$0.02

Here, raising the timeout from 800 to 1,000 ms buys $0.06 for 200 extra milliseconds, while going from 1,000 to 1,500 ms buys $0.02 for 500 ms. A reasonable rule is to stop where the next 200 ms buys less than the revenue you would lose from slower pages. Measure your own bidder response times; the figures above are only an illustration, and Prebid's configuration example, which sets a 3,000 ms global timeout, is a syntax sample, not a recommendation.

A second page-side effect is layout. Ads are among the largest contributors to layout shift, and web.dev recommends reserving the slot's space and not collapsing it when no bid wins.

How do you set up header bidding sensibly?

  1. Start with a small set of partners (for example 3 to 5) and add more only when you can show the extra partner raises the winning price more than it adds latency.
  2. Choose price granularity from your bid distribution, not by default. If most bids are under $3, use a finer bucket.
  3. Set the timeout from measured response times and revisit it each quarter.
  4. Protect direct deals. In the ad server, make sure header bidding line items do not bypass higher-priority direct campaigns.
  5. Run it as an experiment first. Ad servers let you send a percentage of traffic through header bidding while the rest stays on the current set-up, so you can compare revenue and speed.
  6. Watch the real-user page metrics after launch, not only the revenue report.

For the neighbouring terms, see real-time bidding, which is the auction mechanism bidders typically use, and ad network for the demand side of a waterfall.

Measuring header bidding's effect on your page with TapCub

TapCub is not an ad-tech tool: it does not run auctions, hold bids or choose demand partners, and it does not report ad revenue. What it can tell you is whether adding or tuning the bidding wrapper made your pages slower or less engaging for real visitors.

  1. Mark the change. Add a date annotation in Configuration › Annotations the day you add partners or change the timeout.
  2. Read real-user performance. In Monitoring › Performance, compare Largest Contentful Paint, Cumulative Layout Shift and Interaction to Next Paint at P75 (good thresholds: 2.5 s, 0.1 and 200 ms) for the ranges before and after. The page has no previous-period comparison, so set the two date ranges yourself.
  3. Find the pages that got slower. Use the breakdown by page, device and country, and the Slowest pages list, which is sorted by P75 Largest Contentful Paint. See check Core Web Vitals.
  4. Check engagement. In Web analytics › Pages compare bounce and duration on the monetised pages for the same two ranges. If bounce rose as latency rose, the extra bids are costing readers.

Numbers from the page-speed side belong next to your ad-revenue numbers, which come from your ad server.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Oliver Reed

Product Experience Specialist

Explores usability, user journeys, and feature adoption through practical examples of onboarding and everyday product use.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is header bidding in simple terms?

It is a way of selling an ad slot where several buyers are asked to bid at once, before the ad server is called. The highest bid is passed to the ad server to compete with its own demand, so no buyer is skipped just because it sat lower in a fixed order.

What is the difference between header bidding and a waterfall?

A waterfall calls buyers one after another in a fixed priority and the first one that meets its floor wins. Header bidding calls them all at once and the highest bid wins. In the example, the waterfall averaged a $1.44 CPM and header bidding $1.60 on the same six impressions.

Does header bidding slow down a page?

It can, because bids are collected before the ad server is called. A 2019 study of about 35,000 sites found latency up to 3 times the waterfall's in the median case. A timeout limits the wait, at the cost of dropping slow bidders.

How many demand partners should a publisher use?

Prebid says client-side set-ups typically use 5 to 15. Start with a few and add a partner only if it raises the winning price by more than the latency it adds, measured on your own pages.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics