What expression to use to block/permit an entire website?

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Palo Alto Networks Approved
Palo Alto Networks Approved
Community Expert Verified
Community Expert Verified

What expression to use to block/permit an entire website?

L4 Transporter

I'm having trouble figuring out what expression to use(in a Custom URL Category) to match any variation of HTTP requests for an entire website.  For example, I want a single expression to be able to match/block/permit the following HTTP requests...

  • example.com/
  • example.com/path
  • abc.example.com/
  • abc.example.com/path
  • xyz.abc.example.com/
  • xyc.abc.example.com/path


So far I've only been able to match all of the above by using 2 expressions in the Custom URL Category...

  • EXAMPLE.COM/ - This will permit example.com/ and any path after it.  Will not permit any subdomains.
  • *.EXAMPLE.COM/ - Will permit abc.example.com/ and any path after it.


Does anyone know of a way to match an entire website using a single expression?


L6 Presenter

The way PA URL pattern matching works (left start string matching up to separator) it requires a minimum of 2 expressions, one for the root domain and one for any subdomain plus root domain, to properly match a website.




Theoretically, you can use a non-separator terminated expression, but that will match the website as well many other sites and paths, i.e.:



http ://example.com/

http ://subdomain.example.com/

http ://example.com.evil.com/

http ://evil.com/pages/example.com.php


For global blocks this might not be as much of a problem (though you may inadvertently block stuff unintentionally), but it is definitely not a good practice for allowing/categorizing sites.

  • 1 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!