Try this Cancel Rule to block header bidding scripts and test other scripts on production without affecting the live environment. This approach allows you to isolate and evaluate specific scripts without interference from header bidding, ensuring accurate testing. Requestly is trusted by over 200k developers and 1000+ companies for seamless network request management.
Block a header bidding script on websites to isolate testing of other scripts.
Kanishk Rawat
September 24, 2024
2MIN READ
Block header bidding scripts for isolated script testing and efficient debugging using Requestly’s Cancel Rule, ensuring accurate results in a live environment.

Your lightweight Client for API debugging
No Login Required
Get Requestly
Requestly Works on Desktop Only
Requestly isnât available for download on mobile or tablets.
To download it, please open this page on a desktop PC and enter your email to get the link.
Mac app
Lightweight & Privacy-first API Client
- Local Projects
- Organize API into Collections & Environments
- API Tests
- Import from Postman, OpenAPI, etc
Download Now
Chrome extension
Intercept & modify HTTP requests/responses
- Redirect URLs & modify HTTP headers
- Mock API / GraphQL responses
- Insert custom JavaScript scripts
Add To Chrome
Introduction
Header bidding scripts increase ad revenue, but they can get in the way when testing other ad scripts. For example, when you’re working on testing new ad placements or tracking scripts, header bidding can interfere with results, making it hard to see what’s happening.
With Requestly, you can block these header bidding scripts and isolate your tests, making it easier to focus on the other ad scripts you want to evaluate without any confusion.
The Problem
When you run tests with other ad scripts while header bidding is active, the results can be skewed. Header bidding adds extra complexity to the page, making it harder to see how your other scripts are performing
Existing Solutions
Currently, ad tech teams use two common approaches:
- Test Environments: Set up a separate site where header bidding is disabled for testing.
- Manual Removal: Edit the client’s site code manually to remove header bidding scripts before testing.
Both methods work, but they can be slow.
Challenges with These Solutions
These approaches often have the following issues:
- Takes Too Long: Setting up separate test sites or manually removing scripts can take days.
- Requires Developers: You often need a developer to remove or disable the scripts, which slows things down.
Block a header bidding scripts
The
Cancel Rule in Requestly allows you to effortlessly block header bidding scripts on client websites, enabling isolated testing of other scripts. This is perfect for debugging and evaluating different configurations without interference from header bidding scripts, providing accurate insights into performance without altering the client’s production environment.
- Source Condition:Â This is where you decide which requests toÂ
Block orÂcancel. In the example, any request that containsÂexample.com/header-bidding.js in the URL will be affected. - Test URL Condition: You can check if the rules you’ve set up work correctly by testing them on specific URLs.
- Filter Out Condition:Â You can applyÂ
filters to limit which requests are affected, making sure only the ones you want are modified.
Or create your own Rule by following the steps below
Here’s how to set up a rule to block header bidding scripts for isolated testing using Requestly’s Cancel Rule:
- Open Requestly: Open Requestly app.
- Create a New Rule: Click on
New Ruleand select theCancel Requestoption. - Define the URL Pattern: Enter the URL pattern of the header bidding script you want to block.
- Apply the Rule: Save the rule to block the specified header bidding script on the website.
Interactive Guide
Check this interactive and easy explanation of how to use Cancel Request Rule
Conclusion
Written by
Kanishk Rawat
Kanishk Rawat, a tech enthusiast since childhood, has mastered programming through dedication. Whether solo or in a team, he thrives on challenges, crafting innovative solutions .
Contents​
Subscribe for latest updates​
[sibwp_form id=1]
Share this article
Related posts
Get started today
Join 300,000+ developers building smarter workflows.
Get Started for Free
Requestly Works on Desktop Only
Requestly isnât available for download on mobile or tablets.
To download it, please open this page on a desktop PC and enter your email to get the link.
Mac app
Lightweight & Privacy-first API Client
- Local Projects
- Organize API into Collections & Environments
- API Tests
- Import from Postman, OpenAPI, etc
Download Now
Chrome extension
Intercept & modify HTTP requests/responses
- Redirect URLs & modify HTTP headers
- Mock API / GraphQL responses
- Insert custom JavaScript scripts
Add To Chrome









