12

I am debugging an API request in Firefox and I am looking to filter multiple domains in the developer tools' Network panel. I can filter by one domain with the domain:domainname.com, but how do I add additional domains?

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
the_big_blackbox
  • 1,056
  • 2
  • 15
  • 35

3 Answers3

18

Filtering by two domains is not directly possible because the filters in the Network panel is always accumulative, though one workaround is to use a regular expression property filter.

This allows you to provide several domains separating them by pipes (|) like this:

regexp:domain1.com|domain2.com

That should work in most cases, but note that this is not just filtering by domain but searching within all the data inside the requests. That means that when the domain name appears in one of the other columns, the request will also be listed.

Another way to achieve this is to use negative filtering by prepending the filter expression with a minus (-).

So in order to get the requests of two domains you have to write several -domain: expressions for all domains you want to exclude.

Ricardo
  • 3,696
  • 5
  • 36
  • 50
Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
  • thanks so much, I also found another useful tool to monitor all outgoing network requests https://www.telerik.com/fiddler – the_big_blackbox Nov 14 '19 at 08:00
  • The bug request seems outdated as `regexp:` is currently implemented. See other answer. – José Andias Oct 08 '20 at 09:23
  • @JoséAndias You're right. The feature request I had linked referred to the search side panel within the Network panel and was unrelated to filtering. Filtering by regular expressions is already available since Firefox 55 (see https://bugzil.la/1354495). I've changed my answer in order to provide that information. Thank you! – Sebastian Zartner Oct 10 '20 at 21:36
  • I'm glad that this works, but who's "bright" idea was it to make all other filters simply use regex by encapsulating it in / and HERE it has to be done with a keyword?... – BloodyRain2k Jan 09 '23 at 18:57
5

There's also the regexp keyword to use Regular Expressions for URL filtering.

https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list#Filtering_by_properties

mortalis
  • 2,060
  • 24
  • 34
3

If you want to filter out domains that are cluttering up your requests pane, you simply use the - prefix and separate them with spaces.

-domain:domain.com -domain:domain2.com

The important thing here is that in Firefox you cannot use wildcards like you can in Chrome. So this won't work.

-domain:email.*.com

This is what kept tripping me up. Also, for awhile I thought you separated them with commas. Nope, use spaces.

redwards510
  • 1,802
  • 1
  • 17
  • 23