How to block a URL in Chrome, Firefox & Safari
Sagar Soni
February 18, 2025
Learn how to block URLs in major browsers (Chrome, Firefox, Safari) using Requestly. Improve focus, test error scenarios, and control your browsing experience.

To block URLs in browser, you can use Requestly’s Cancel rule.
Use Cases:
- Blocking Websites: You can use Cancel Rule to avoid distraction by blocking websites e.g. youtube, twitter, facebook.
- Testing error scenarios: Test your app when certain resource is not loaded. You can use Cancel rule to block a certain request which is not mandatory in your app and test how your app behaves without that specific resource.
Use Requestly browser extension to block URL
To block a URL create a Cancel rule in Requestly:
- Install Requestly’s browser extension.
- Click Create your first rule and go to Cancel Request and click Create Rule.
- Enter the URL condition to block.

- Source Condition: Source condition is where you set criteria for the rules. You can use
URL
,Host
orPath
withRegex
,Contains
,Wildcard
orEquals
to match the source request. Learn more about source conditions here. - Source Filters : You can define better targeting conditions and restrict rules to be applied on specific webpages (or domains), request types, request methods, or request payload. Learn more about source filters here.
Written by
Sagar Soni
Sagar is the co-founder and CTO of Requestly. When he’s not busy architecting the next big thing in software development, you’ll likely find him behind the wheel, cruising the streets and enjoying the thrill of the drive. For Sagar, it’s all about the code by day and the open road by night.
Contents
Subscribe for latest updates
Share this article
Related posts

How to Change Your IP Address Using Requestly
Learn how to change or spoof your IP address using the X-Forwarded-For header with Requestly. Step-by-step guide for developers to simulate client IPs easily
Dinesh Thakur
June 1, 2025

Using Requestly to Toggle Feature Flags
Learn how to test feature flags easily with Requestly by modifying headers and cookies, no backend changes needed for faster, safer releases.
Kanishk Rawat
May 29, 2025

Using Requestly for Localization Testing
Test localization effortlessly with Requestly by simulating regions using headers, no backend changes needed.
Kanishk Rawat
May 28, 2025