What is header bidding and how does it work?
July 23, 2026 9 min read 288 views
In programmatic advertising, small changes in how inventory is sold can have a big impact on revenue. Header bidding is one of those changes. We’ll break down how the header bidding code works behind the scenes, why publishers adopted it, and how client-side, server-side, and Prebid implementations compare.
What is header bidding?
Header bidding is a programmatic advertising technique that allows publishers to offer an ad impression to multiple demand sources at the same time before their ad server makes a decision. By creating a real-time auction before the ad call reaches the server, publishers can maximize competition for their inventory and increase the likelihood of securing the highest CPM.
This process allows publishers to “see” which demand sources (e.g. demand-side platforms [DSPs] and ad networks connected to ad exchanges and supply-side platforms [SSPs]) are placing the bids and the monetary value of their bids (e.g. $1.05), allowing them to get the highest cost per mille (CPM) possible. As bids are received before a publisher’s ad server is called, they are able to compete with a publisher’s premium deals, meaning advertisers have a better chance of winning the impression and publishers earn more money for their inventory.
Why did header bidding replace waterfall auctions?
Header bidding replaced waterfall auctions by allowing multiple demand sources to compete for the same ad impression simultaneously instead of one at a time. This gave publishers greater competition for their inventory, increasing the likelihood of securing the highest possible CPM.
AdTech vendors developed header bidding to enable publishers to collect bids on their inventory from demand sources before the ad call was sent to their DoubleClick for Publishers (DFP) ad server. The reason for this was to avoid the common situation where the DFP, which is used by a large majority of publishers, favored bids from the Google ad exchange, meaning non-Google demand sources would often miss out on bidding on or purchasing the publisher’s inventory, even though they were willing to pay more for it.
Header bidding has also, somewhat accidentally, replaced waterfall auctions.
A waterfall auction is a structured process for selling inventory handled by the publisher’s ad server, which would sell the available inventory to potential buyers in a sequential fashion.
Typically, the ad server would offer the inventory to premium buyers (e.g. guaranteed buys, direct sales made between the publisher’s sales team and the advertiser, and sponsorships). If the premium buyers failed to purchase all of the available inventory, the ad server would approach the next potential buyer (e.g. an ad network) with the aim of selling the remaining available inventory, known as remnant inventory.
The ad server would continue contacting various demand sources until all of the available inventory was sold. In the event the available inventory wasn’t sold, the publisher could display in-house ads (ads promoting their own products or services).
How does header bidding work?
Header bidding works by inviting multiple demand sources to bid on an ad impression before the publisher’s ad server selects a winning ad. Instead of evaluating buyers one at a time, the auction takes place simultaneously, giving publishers greater competition for every available impression.
The process begins by adding a JavaScript snippet, provided by the header bidding vendor, to the <head> element of the publisher’s website.
The JavaScript snippet connects the page to multiple demand sources interested in purchasing ad inventory.
Each time the page loads, those demand sources (e.g. ad networks and buyers connected to supply-side platforms [SSPs] and ad exchanges) can bid on every available impression. Because bids are submitted before the publisher’s ad server is called, advertisers can compete alongside direct deals, increasing their chances of winning the impression while helping publishers maximize revenue from their inventory.
A step-by-step explanation of how header bidding works
Below is a step-by-step breakdown of what happens from the moment a user lands on a publisher’s website to the sale of available ad inventory:
- A user opens their web browser and types in the publisher’s URL (e.g. publisher-abc.com).
- The browser starts loading the page.
- The header-bidding JavaScript code located in the element executes and sends a request to the third-party header platform.
- Bids from various sources start coming in.
- The highest bid wins and then competes with the publisher’s other deals.
As you can see in the diagram, the speed at which bids are placed varies. This latency not only means some demand sources may not be able to place a bid due to being timed out, but also results in the page taking longer to load. The timeout rates vary and are different on desktop and mobile. With desktop, the timeout range is 400–800 milliseconds; with mobile, it’s 800–1,200 milliseconds.
The process described in the image above is an example of client-side header bidding (CSHB), but there is also a server-side implementation.
What is server-side header bidding?
Server-side header bidding (SSHB) routes ad requests through a dedicated server instead of sending them directly from the browser to multiple AdTech platforms. This reduces the amount of work performed in the browser while still allowing multiple demand sources to compete for the same ad impression.
The server then sends the ad requests to different ad exchanges, SSPs, and DSPs. Once it has received the bids, it sends them back to the browser and on to the publisher’s ad server.
The main advantage of server-side header bidding
The main advantage of server-side header bidding is a reduction in page latency. As all of the bidding happens outside of the browser in a dedicated server, the browser is able to render all the other parts of the page without being bogged down with multiples ad requests — resulting in a better user experience.
The main disadvantages of server-side header bidding
Despite the improvements in the user experience, server-side header bidding does come with a few disadvantages. The main ones being:
- A lack of transparency — as the bidding happens in a server, it can be hard for publishers and advertisers to see the details of the auctions, meaning they don’t know the true cost of the impressions, what auction type was used (e.g. first- or second-price auction), and how many fees were added on top.
- Bid latency — even though SSHB reduces page latency, the same cannot always be said for bid latency. Some bids may not be able to respond to the ad requests in time because of the extra step involved in SSHB (i.e. sending ad requests to the server first and then on the supply and demand sources, rather than sending them directly from the browser).
- Cookie match rates — because SSHB moves the bidding process off the page, cookies can be lost. This not only makes it hard for advertisers to identify users, but also means they may need to sync cookies, which can be a rather error-prone process.
- Technical complexity — setting up, configuring, and managing a server-side header bidding connection is much more complex for the header-bidding vendor and the platforms that use it.
It’s important to note that while the header-bidding process is nothing new — it’s been around for about 10 years — it really started to take off in 2014 and 2015 with the help of programmatic media buying.
In-app header bidding
Header bidding is currently making its way to various new platforms as more and more companies make their foray into the modern, faster bidding method. Platforms that already offer in-app header bidding include Google AdMob, Amazon, Oath (now a part of Yahoofollowing the merger of AOL and Yahoo), and AppLovin.
Technically speaking, header bidding has grown to become a slight misnomer today as mobile apps don’t have a header per se – but the core idea remains unchanged. Bids are simultaneously solicited from multiple demand partners before a call to the ad server is made.
FAQ
Final thoughts
The introduction of header bidding has changed the game of online advertising and brought with it a number of advantages for publishers and advertisers alike. Innovation is a constant force in the online advertising technology ecosystem, and AdTech companies adapt to changes in header bidding solutions.
Ready to boost your ad revenue with efficient header bidding? Let’s discuss a custom solution that fits your publishing needs and maximizes your inventory’s value.