How to block a URL in Chrome, Firefox & Safari

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:

  1. Install Requestly’s browser extension.
  2. Click Create your first rule and go to Cancel Request and click Create Rule.
  3. Enter the URL condition to block.
  1. Source Condition: Source condition is where you set criteria for the rules. You can use URLHost or Path with RegexContainsWildcard or Equals to match the source request. Learn more about source conditions here.
  2. 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.

Share this article:

Subscribe to our weekly newsletter !

Join 10k developers and QAs to get weekly updates with Requestly's newsletter.​

This article was written by:

Picture of Sagar Soni

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.

Join 10k developers and get weekly updates with Requestly's newsletter.

Contents

Related posts