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.

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
Blockorcancel. In the example, any request that containsexample.com/header-bidding.jsin 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
filtersto 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
Share this article
Related posts

That’s a Wrap on Hacktoberfest 2025: Our Success Story
Requestly’s first Hacktoberfest was a huge success! 🎉 15 new contributors, 28 total contributions, and an incredible mix of code & no-code creativity.
Akanksha Bhadauria
November 5, 2025

Endpoint ft. Kushagra Gour: A Builder’s Philosophy on Craft and Empathy
In the world of technology, some leaders don’t just follow trends—they define them. They are the builders and thinkers, grounded in real-world experience, whose insights push the industry forward. To celebrate their work and bring their hard-won wisdom to the community, we’re proud to introduce Endpoint—a series by Requestly spotlighting the leaders shaping the future of software.
Kanishk Rawat
November 3, 2025

1xx HTTP Status Codes: Informational Responses
Explore 1xx informational HTTP status codes and their role in communicating request progress between client and server.

Azma Banu
November 3, 2025






