Header bidding is a small piece of code at the top of a web page that asks many supply-side platforms and ad exchanges for bids at the same time, before the page's ads load, so that the publisher gets the best price for each ad slot. The header is the top section of a web page's code, which the browser reads first. A publisher is the owner of the website, and a bid is the price that a buyer offers for one showing of an ad.
Before header bidding, publishers used a method called the waterfall. The publisher's ad server, the software that decides which ad fills each slot, offered the slot to one buyer at a time, in a fixed order. If the first buyer did not pay the asking price, the server tried the second buyer, then the third. A buyer lower in the order never got the chance to bid, even if it would have paid more. So publishers often sold their space for less than it was worth.
Header bidding asks every buyer at once. Take a car-review website, and a reader in Kochi who opens its review of a new electric SUV. The code in the page's header sends a request to six supply-side platforms (SSPs) and ad exchanges at the same moment. Each one runs its own quick auction among its buyers, and returns its best bid. The code waits for at most 1 second. Five bids arrive in time: ₹45, ₹70, ₹52, ₹38 and ₹66 CPM, meaning rupees per thousand showings. The sixth bid arrives late, and it is ignored. The code passes the best bid, ₹70, to the publisher's ad server. The ad server compares it with the site's own direct deal for that slot, which pays ₹60 CPM. The ₹70 bid is higher, so it wins, and its ad loads on the page.
There is a trade-off. Each extra bidder adds a little waiting time, and slow pages lose readers. So publishers set a time limit, and usually ask a handful of bidders, not dozens. Some publishers move the work to a server, which asks the bidders on the page's behalf. This is called server-side header bidding.
Header bidding also needs watching. More bidders means more openings for bots, programs that pretend to be readers, to slip in fake impressions. This is called ad fraud. Smaller publishers often pay a specialist company to run their header bidding and to filter out such traffic. The code that most websites use for header bidding is free, open-source software. Selling ad space this way is one form of real-time bidding (RTB).