Header bidding

On this page 8

Header bidding is a programmatic auction technique in which a publisher offers each ad impression to several demand partners simultaneously before the request reaches the publisher ad server. In digital advertising, it replaced much of the older sequential setup and gave publishers a clearer view of what their inventory is actually worth.

The name comes from the original implementation: a piece of JavaScript placed in the page header that collected bids while the rest of the page loaded. Within marketing and media sales, header bidding is now a standard part of how open-web publishers monetize display, video and increasingly connected TV inventory.

How a header bidding auction runs

A header bidding auction runs before the ad server decision, so external bids can compete on equal terms with the publisher’s own direct deals. The browser or a server sends a bid request to each configured supply-side platform or exchange, waits for responses within a fixed timeout, and passes the winning prices to the ad server as key-value targeting.

The ad server, most often Google Ad Manager on the open web, then treats those prices as line items at specific price points. It compares them with guaranteed campaigns and its own exchange demand, and the highest eligible offer fills the slot. The process typically completes in roughly 500 to 1,500 milliseconds, depending on the timeout and the number of partners.

The following table shows the main stages of a single auction and what each one contributes.

StageWhat happensMain parameter
Page loadWrapper script initializes and reads ad unit definitionsAd unit sizes and IDs
Bid requestsParallel requests go to each bidder adapterNumber of bidders
Bid collectionResponses arrive until the timeout expiresTimeout, often 700 to 1,500 ms
TargetingWinning bid is converted to price bucket key-valuesPrice granularity
Ad server callAd server compares header bids with other demandLine item priority
RenderingWinning creative is delivered and the impression countedCreative markup and tracking
Stages of a client-side header bidding auction

Why publishers moved away from the waterfall

Header bidding solved the central weakness of the waterfall model, in which an impression was offered to demand partners one at a time in a fixed order. In a waterfall, a partner ranked lower could have paid more but never saw the impression, because a higher-ranked partner accepted it first at a lower price.

Waterfall rankings were based on historical average prices, not on the value of the specific impression. Header bidding replaced that guess with real-time competition, which usually raises yield and gives publishers transparent price discovery across partners. It also weakened the last-look advantage that the ad server’s own exchange once held.

AspectWaterfallHeader bidding
Auction orderSequential, one partner at a timeSimultaneous across partners
Pricing basisHistorical average floor pricesLive bids per impression
Demand competitionLimited, ranking decidesBroad, highest bid decides
Typical latencyGrows with each passbackBounded by a single timeout
Revenue effectLeaves value unclaimedUsually higher yield per impression
Operational effortSimple to configureMore partners and line items to manage
Waterfall compared with header bidding

Client-side, server-side and hybrid setups

Header bidding can run in the browser, on a server, or in both, and the choice is a trade-off between match rates and page speed. The open-source Prebid.js library is the dominant client-side wrapper, while Prebid Server and Amazon’s Transparent Ad Marketplace are common server-side options.

In a client-side setup, the browser sends every request itself, which preserves cookie matching and tends to produce higher bids. In a server-to-server setup, one request leaves the browser and a server fans it out, which reduces page weight and latency but often lowers match rates. Many publishers therefore run a hybrid configuration.

SetupStrengthWeaknessTypical use
Client-sideHigh user match ratesHeavier pages, more latencyWeb display with few bidders
Server-sideFast pages, many bidders possibleLower cookie match ratesVideo, apps and connected TV
HybridBalances yield and speedMore complex to maintainLarge publishers with many partners
In-app biddingWorks in mobile SDKsDepends on mediation platformsMobile games and apps
Deployment options and their trade-offs

Header bidding is a publisher-side auction layer, not a replacement for real-time bidding or the ad exchange. Each bidder in the header usually runs its own real-time bidding auction among demand-side platforms, so one impression may pass through several nested auctions before a single winner emerges.

Because of this nesting, the industry moved from second-price to first-price auctions around 2019. In a second-price world, nested auctions made the clearing price opaque and invited manipulation. First-price rules made bids directly comparable, and buyers responded with bid shading to avoid overpaying.

ConceptRole in the chainRelation to header bidding
SSPSells publisher inventoryActs as a bidder in the wrapper
Ad exchangeMarketplace that matches bidsOften embedded in each SSP
DSPBuys on behalf of advertisersBids into SSPs, not into the header directly
Real-time biddingPer-impression auction protocolRuns inside each header bidder
Ad serverFinal decision engineReceives header bids as targeting
How header bidding relates to neighboring concepts

Configuring header bidding well

Good header bidding configuration balances revenue against user experience, because every extra bidder and every additional millisecond of timeout affects page speed. Most publishers find that five to ten well-performing bidders capture most of the available demand, and that additional partners add latency faster than revenue.

  • Set the timeout from measured bidder response times, not from a default value.
  • Use price granularity fine enough to keep bid value, typically 1-cent or 10-cent buckets at common price ranges.
  • Apply floor prices carefully, since floors that are too high reduce fill rates.
  • Enable lazy loading so auctions for below-the-fold slots run only when the user scrolls near them.
  • Review bidder performance monthly and remove partners with low win rates or slow responses.

Limitations and common mistakes

The main risks of header bidding are latency, duplicated demand and privacy constraints. Multiple SSPs often resell access to the same DSP buyers, so a buyer may effectively bid against itself, which inflates auction volume without adding real competition. The industry answered with supply path optimization, where buyers favor the shortest and cleanest routes.

Privacy regulation and the decline of third-party cookies also reduce the identity signals available to bidders. Publishers increasingly rely on consent management platforms, the IAB Transparency and Consent Framework, ads.txt and sellers.json, and first-party identifiers to keep bids competitive.

SymptomLikely causeRemedy
Slow page renderingToo many client-side biddersMove some bidders server-side
Bids lost at the ad serverCoarse price buckets or missing line itemsRefine granularity and line item setup
Low bid ratesMissing consent or identity signalsFix consent flow and add identity modules
Discrepancies in reportingDifferent counting methods per partnerReconcile on rendered impressions
Falling CPM over timeDuplicate paths and buyer shadingPrune redundant resellers
Frequent problems, causes and remedies

A plain-language summary

Header bidding is a way for a website to sell each ad space to the highest bidder instead of offering it to buyers one after another. Before an ad appears, the page quietly asks several ad companies at once how much they will pay, then picks the best offer.

Think of it as an open auction instead of a queue. In the old queue, the first buyer in line could take the space cheaply even if someone further back would have paid more. With header bidding, everyone bids at the same moment, so the website earns closer to what the space is really worth.

An example from practice

A regional news publisher with about 40 million monthly page views relied on a waterfall with three ad networks and its ad server’s own exchange. Revenue had stalled, and the ad operations team suspected that lower-ranked partners were willing to pay more than they were ever allowed to.

The team deployed Prebid.js with six client-side bidders and a 1,000-millisecond timeout, moved two video partners to Prebid Server, and enabled lazy loading for slots below the fold. They created line items in 10-cent increments up to the price range where most bids landed.

After two months of tuning, the publisher reported a clear increase in average CPM on display inventory and a higher fill rate, while page load time stayed close to its previous level thanks to lazy loading. The team then removed one bidder that won less than 2% of auctions but added noticeable latency.