Lesson 3 of 7 · 8 min read · intermediate
Header bidding and Prebid
Why publishers replaced the waterfall with header bidding, how Prebid.js and Prebid Server work, and how Google responded.
Around 2014, publishers discovered a hack. Instead of letting their ad server offer each impression to one partner at a time, they added code to the top, or "header", of their web pages that asked many SSPs for bids at once, before the ad server even made a decision. Revenues jumped. Within a few years this trick, header bidding, became the default way the open web sells ads.
The old way was like selling your bicycle by phoning one friend, waiting for a yes or no, then phoning the next. Header bidding is like posting it in a group chat with ten friends and taking the best offer in the next minute. Same bike, more competition, better price.
The problem: the waterfall
Under the waterfall, the publisher ad server ranked demand sources by their average historical price and called them in order. The first partner could take the impression at its fixed price even if a partner further down would have paid more for that particular user. Google's own exchange had a special advantage: through dynamic allocation, Google Ad Manager let AdX compete against the publisher's floor in real time while other partners were stuck in fixed positions, and it could see their prices. The court in the US ad tech case later described related privileges such as last look as part of how Google neutralised competition.
Waterfall vs header bidding
In the waterfall, the publisher offers the slot to one partner at a time, in a fixed order, each with a floor price.
- The old way: a waterfall: In the Waterfall (daisy-chaining), the publisher offers the slot to one partner at a time, in a fixed order, each with a floor price.
- Pass… pass…: Network 1 has nothing worth $3 for this visitor, so it passes. The slot trickles down to Network 2, then Network 3. Every hop adds delay.
- Money left on the table: Network 3 takes it for $1.20. But Network 2 had a buyer willing to pay $2.80. It was never asked the right way. The order, not the price, decided who won.
- The new way: ask everyone at once: Header bidding puts a wrapper like Prebid in the page. It sends the request to every partner simultaneously.
- Real prices come back: Everyone answers with a real price within a timeout (typically 1–1.5 seconds on the web): $2.10, $2.80, $1.20.
- The ad server decides on price: The best header bid ($2.80) is passed to the publisher ad server, which compares it with direct deals and other demand. The highest price wins. Publishers typically earned noticeably more after switching.
How client-side header bidding works
- Page loads a wrapperA JavaScript library, usually Prebid.js, loads in the page header along with a list of configured demand partners ("adapters").
- Parallel requestsThe wrapper sends bid requests to all partners at the same time, each via its SSP.
- Wait for the timeoutBids arrive within a set window, often around one second on the web. Late bids are discarded.
- Pass bids to the ad serverThe best bids are attached to the ad request as key-values, so line items in the ad server can compete against direct campaigns and Google's demand.
- Ad server decidesThe ad server picks the winner. If a header bidder wins, its ad is rendered.
Prebid: the open-source standard
Prebid started in 2015 as an open-source project from AppNexus (later Xandr, now part of Microsoft). In 2017 it moved to an independent body, Prebid.org, whose members include SSPs, publishers and other ad tech firms. Prebid.js runs in the browser; Prebid Mobile covers apps; and Prebid Server moves the auction to the cloud. Because it is free and neutral, Prebid became the most widely used header bidding wrapper on the open web.
Client-side versus server-side
Running many auctions inside the user's browser is heavy. Every extra partner adds network calls and slows the page, hurting user experience. Server-side header bidding solves this by sending a single request from the page to a server, which then fans out to many bidders.
Client-side (Prebid.js)
- Auction runs in the browser
- Each bidder can sync cookies directly, so match rates are higher
- More partners means more page latency
- Publisher sees every bid clearly
Server-side (Prebid Server, Amazon TAM, Google Open Bidding)
- Auction runs in the cloud
- Lighter page, more partners possible, essential for apps and CTV
- Lower cookie match rates, so bids can be lower
- Depends on trusting the server operator
Many publishers use a hybrid: a few high-value bidders client-side, the long tail server-side. Amazon runs its own server-side offering, Transparent Ad Marketplace (TAM) for large publishers and Unified Ad Marketplace (UAM) for smaller ones. Google responded to header bidding with Exchange Bidding, later renamed Open Bidding, a server-side auction inside Google Ad Manager where other exchanges can compete, for a fee.
Side effects: duplication and complexity
Header bidding created new problems. The same impression is now offered through several SSPs at once, and the same DSP may receive five or ten copies of one opportunity. This bid duplication inflates bid volumes, makes it harder to judge real supply and encourages buyers to cut paths, the subject of the supply path optimization lesson. It also made latency and auction timeout settings a constant balancing act for ad-ops teams.
Today the unified auction in Google Ad Manager, header bidding via Prebid, and server-side marketplaces from Amazon and others coexist on most large sites. The practical lesson for anyone buying or selling: the path an impression takes to reach a buyer is rarely simple, and each path has its own fees, speeds and data quality.
Key takeaways
- Header bidding asks many demand partners for bids at once, before the ad server decides, replacing the fixed-order waterfall.
- Prebid is the open-source wrapper most publishers use, governed by Prebid.org since 2017.
- Client-side is transparent but slows pages; server-side is faster but lowers cookie match rates and needs trust.
- Header bidding caused bid duplication, which later drove buyers toward supply path optimization.
- A 2026 US court remedy orders Google to make its exchange interoperate with Prebid and drop first and last look.
Questions people ask
What is header bidding in simple terms?
Header bidding is a technique where a website asks many ad buyers for bids at the same time, before its ad server makes a decision. Code in the page header, usually Prebid.js, collects the bids and passes the best ones to the ad server to compete with direct deals. It replaced the waterfall, which offered impressions to one partner at a time, and generally raised publisher revenue.
What is the difference between Prebid.js and Prebid Server?
Prebid.js runs the header bidding auction inside the user's browser, calling each demand partner directly, which is transparent but adds page load time. Prebid Server moves the auction to a cloud server: the page sends one request and the server contacts all bidders. It is lighter and essential for apps and connected TV, but user ID matching is usually weaker.
What is Google Open Bidding?
Open Bidding, previously called Exchange Bidding, is Google Ad Manager's server-side way for third-party exchanges to compete for a publisher's impressions inside Google's own auction. It launched as Google's response to header bidding. Partners bid in real time alongside AdX, and Google charges a fee on winning bids from those third-party exchanges.