Header Bidding: definition, operation, technologies and revenue impact

Header Bidding

Header bidding came out in 2014, but only started to be used in 2015 when Prebid.js was launched. Prior to Prebid, the programmatic ecosystem used a waterfall setup to sell ad inventory.

In this article, you will understand how header bidding works, a method that optimizes ad revenue for websites and apps through programmatic advertising.

What is Header Bidding?

Header bidding is one of the methods for managing programmatic media buying and selling. This method allows publishers and app developers to offer ad space to different ad platforms before engaging the publisher’s ad server.

Through header bidding, different demand sources can bid on the same ad inventory, fostering a fairer and more competitive programmatic ecosystem, besides maximizing ad revenue.

Header Bidding Technology

Launched in 2015 by AppNexus, Prebid.js, a “wrapper” (javascript that involves a series of instructions) was activated when a user started loading a page and called different advertising agencies/advertisers to compete, in real time. The site’s publisher automatically selected the most profitable advertising.

In 2017, Prebid.org was launched, a partnership between AppNexus and Rubicon Project. This open source solution is known as “header bidding”, that means, competition between advertisers/advertising platforms offering the best price for a real-time ad. Since then, header bidding has been used widely.


Prebid.js bills itself as “a feature-rich header bidding platform for the web that can call over 300+ demand sources and 50 parsing adapters that supports currency conversion, GDPR/GDPR, common identification systems and multiple ad servers”.

Prebid.js allows publishers to implement a header bidding system on their website or app. It also enables bid retrieval and ranking, called asynchronous ads, without the need to develop a custom solution.

How does Prebid.js work?

As soon as an ad impression becomes available (when a user calls a page URL or enters the app), the Prebid.js library is launched and starts fetching auction bids as well as ad code from ad exchanges, SSPs and active advertisers.

These offers and advertisements are transmitted to the publisher’s ad server, which subsequently activates a predetermined selection system based (but not limited) on criteria such as price floor, types and ad’s formats, to compare these offers and store them in the offer stack.

After the comparison, if the ad server finds a bid that meets the minimum prerequisites for both the advertiser and the publisher, the server sends a signal to the Prebid.js library with the characteristics of the bid and the location of the winning ad.

Benefits of using Prebid.js

According to Prebid.org, the header bidding process runs faster when Prebid.js is used, reducing response time from the requesting partner, which leads to a better user experience.

Furthermore, this technology is flexible since it works on smartphone, desktop or tablet. It also manages banner ads, native ads or video ads.

The system provides analysis reports, where it is possible to understand what is working, for example, the list of partners that did not perform well.

Prebid.org also has its own community of professionals and experts working to improve the product and support users. Since the primary purpose of serving ads is to generate advertising revenue, the benefit to the publisher is the increased revenue.

Downside of using Prebid.js

While Prebid.js is free and open source header bidding software, that doesn’t necessarily mean that anyone can easily set up, maintain and run header bidding out of the box.

If you (publisher or application developer) have a digital advertising team capable of configuring, managing and optimizing the proper functioning of header bidding, this management system can positively impact your revenue. If not, you’ll need a specialist technology partner.

Another element you need to consider is the page loading speed. Although Prebid.js reduces the response time of the requesting partner, the process of loading the scripts to execute it causes delay in the browser, which increases the page rendering time.

Due to the complexity of implementation and maintenance, header bidding may not be suitable for all publishers. Therefore, consider all these factors before opting for Prebid.js and test to make sure this solution aligns with your business goals and user experience.

How does Header Bidding work?

Most of the medium and large scale publishers and app developers sell ad space in real time. This means that when a user accesses a webpage or an app, advertising is displayed.

Header bidding is implemented through Prebid.js. As soon as a webpage or app is accessed, the code checks if there is a direct sale transaction and if the ad space was sold at a good price by the website or app team, and prioritizes the ad. In this case, the process is paused and the ad is sent.

But if no ad was sold via direct transaction, the code asks ad-exchanges, marketplaces and other advertising platforms if any advertisers are offering a price greater than or equal to the requested price. If so, the highest bidder/buyer gets the right to display the ad.

Waterfall Method

Header bidding is not the only way to manage auctions. Prior to 2015, ad auctions were managed using the Waterfall method. In this method, the JavaScript code offers the ad space at a minimal price to advertisers on ad platform “A”.

If none of the advertisers on that platform offers the minimum bid requested by the publisher, the code bids for an ad platform “B”. If an advertiser on platform “B” bids the minimum bid, advertiser on platform “B” wins the auction and submits the creative.

The shortcoming of this management method is that the code stops as soon as it finds the minimum bid, failing to investigate whether an advertiser on another platform is willing to bid higher for the ad space. If that’s the case, the sale price is the second best bid + $0.01.

Header Bidding Method

The widespread use of header bidding for auction management happened in 2019. In this method, Prebid.js offers ad space simultaneously to 30, 100 or N advertising platforms to find the highest bidder.

The code runs at the browser level (Firefox, Chrome, etc.) for websites, or SDK integrations that generate ad requests on apps.

On websites, the header bidding JavaScript code can be executed at the publisher’s ad server level, before the page’s HTML code is sent to the browser. This creates the possibility to decrease the time needed to load the page.

Header bidding on the app is based on the same principle, but works without Prebid.js. The ad request is auctioned in the cloud with the ad server request partners, which sends a response back to the SDK in the scenery of a winning bid.

Header bidding can work in two different ways within the app: (1) via a direct request to a primary ad server, or (2) without a primary ad server. The second method is usually for developers who don’t have an inventory sales team.

Waterfall vs Header Bidding

Check out the differences between the two types of bid management in the infographic below:

Waterfall vs Header Bidding

Header Bidding best practices

  • Identify the most profitable demand partners to determine the maximum number of partners to the point of not impacting ad load time. To do this, evaluate the partners’ CPM and the latency they cause on your page. Also, analyze how often partners win the auction and how often they bid.
  • For creatives to appear at the optimal time, set an expiration time for each bidder. These times must be faster than the slowest response to a bid request.
  • When setting an expiration time for each bidder, you need to vary the order in which your bidders are called. So set a random call so everyone has a chance to bid before the cap. This will ensure that the slower, but higher, bidders also have the chance to participate in the auction.
  • In addition to revenue optimization, loading time is one of the benefits of header bidding. But in order to get the most out of it, you need to find ways to reduce it and optimize as much as possible so that the user has a good experience on your website or app. Therefore, adopt the HTTP/2 protocol to improve and optimize the flow of content between clients and servers. Make sure your hosting and connection are able to support HTTP/2.


In a short note, header bidding provides advantages including increased revenue, more control for publishers and developers, faster loading times, advanced knowledge of buyers, more advertisers bidding and better ads for users, but its implementation requires extensive technical knowledge expertise and also needs that best practices are carefully followed.

Header bidding is the most used ad management method in revenue optimization strategies, whether on websites or apps. If you want to try header bidding, GnetRTB might be the best place for you! Access this link and be assisted by our specialists team.