Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?




Hierarchy Level


Use URL pattern lists to create custom URL category lists. These are lists of patterns that bypass scanning.


Custom category does not take precedence over predefined categories when it has the same name as one of the predefined categories. We do not recommend having a custom category name be the same as the predefined category name.

Starting in Junos OS Release 20.4R1, the URL filtering supports the regular expression format given in Table 1.

Table 1: Regular Expression Format


Pattern Format



Asterisk (*) in domain name

Pattern = [*].sub-domain..sub-domain

Asterisk should be at the head only.

Match 0-N words in domain name.



Caret (^) in domain name

Pattern = [^]..[^].sub-domain.[^]..[^].sub-domain.[^]..[^]

Caret could be at any place.

Match one word in domain name.



Question Mark (?) in domain name

Pattern = sub-domain.sub-domain.sub-do[?][?]

Question mark should be at the tail only.

Match one character in domain name.


All wildcard

Pattern = *, or *.*, or *.*.*

Special pattern.

Match all URLs.

Same as pattern.

Prefix in URL path

Pattern = <domain-name>/[prefix]

Match the longest prefix in the URL path.



Keywords in URL path

Pattern = <domain-name>/[prefix][*token][*token][*token]

Match keywords in URL path.

Support 0-3 tokens.



The system validate the URL patterns when you commit the configuration. If you configure an invalid pattern, the system shows a popup warning with the first bad character in (). For example, the pattern a.*.com shows a warning message Pattern a.(*).com not supported.

Starting in Junos OS Release 20.4R1, we have introduced a golden match for multiple URL patterns. When you configure multiple patterns for one domain, sometimes a specific URL could match multiple patterns, then the URL filtering module selects the best out of these patterns, which is the golden match. For the selection of the golden match, the URL filtering module prioritizes the URL pattern in the following sequence:

  1. Select the best domain name pattern to match.

  2. Within the same domain name pattern, select the longest prefix match of the URL path.

  3. Within the same domain name pattern and same URL path prefix, keyword match will take the priority.

For example, if you configure the following four patterns:

  1. Pattern 1 =

  2. Pattern 2 =^/gb/chinamkt/

  3. Pattern 3 =^/gb/chinamkt/*.shtml

  4. Pattern 4 = *

For the URL, the golden match section will be as follows:

  1. URL filtering module considers all the four patterns as a potential match in the domain name match stage, and the priority order is: >^ > *

  2. Within the same domain name pattern, the URL filtering module considers the longest prefix match of the URL path.

    • Pattern 1 does not match the URL path and the URL filtering module skips pattern 1.

    • Pattern 2 and pattern 3 have the same prefix in the URL path. Hence, the keywords match controls the golden match selection. Finally, the URL filtering module prefers pattern 3 that has the longest keywords match as the golden match.


  • object-name—Name of the URL list object.

  • value value—Value of the URL list object. You can configure multiple values separated by spaces and enclosed in square brackets.

Required Privilege Level

security—To view this statement in the configuration.

security-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 9.5.