Rules for creating masks for web resource addresses

Using a web resource address mask (hereinafter also referred to as simply "address mask") may be useful if you need to enter numerous similar web resource addresses when creating a web resource access rule. If crafted well, one address mask can replace a large number of web resource addresses.

When creating an address mask, adhere to the following rules:

  1. The * character replaces any sequence that contains zero or more characters.

    For example, if you enter the *abc* address mask, the access rule is applied to all web resource addresses that contain the sequence abc. Example: http://www.example.com/page_0-9abcdef.html.

    The ? character is treated as a question mark.

    To include the * character in the address mask, you need to enter the * character twice.

  2. The www. character sequence at the start of the address mask is interpreted as a *. sequence.

    Example: the address mask www.example.com is treated as *.example.com.

  3. If an address mask does not start with the * character, the content of the address mask is equivalent to the same content with the *. prefix.
  4. A sequence of *. characters at the beginning of an address mask is interpreted as *. or an empty string.

    Example: the address mask http://www.*.example.com covers the address of the web resource http://www2.example.com.

  5. If an address mask ends with a character other than / or *, the content of the address mask is equivalent to the same content with the /* postfix.

    Example: the address mask http://www.example.com covers such addresses as http://www.example.com/abc, where a, b, and c are any characters.

  6. If an address mask ends with the / character, the content of the address mask is equivalent to the same content with the /*. postfix.
  7. The character sequence /* at the end of an address mask is interpreted as /* or an empty string.
  8. Web resource addresses are verified against an address mask, taking into account the protocol (http or https):
    • If the address mask contains no network protocol, this address mask covers addresses of web resources with any network protocol.

      Example: the address mask example.com covers the web resource addresses http://example.com and https://example.com.

    • If the address mask contains a network protocol, this address mask only covers web resource addresses with the same network protocol as that of the address mask.

      Example: the address mask http://*.example.com covers the web resource address http://www.example.com but does not cover https://www.example.com.

  9. An address mask that is in double quotes is treated without considering any additional replacements, except the * character if it has been initially included in the address mask. In other words, rules 5 and 7 do not apply to such address masks (see examples 14–18 in the table below).
  10. The user name and password, connection port, and character case are not taken into account during comparison with the address mask of a web resource.

     

    Examples of how to use rules for creating address masks

     

    No.

    Address mask

    Address of web resource to verify

    Does the address match the address mask?

    Comment

    1

    *.example.com

    http://www.123example.com

    No

    See rule 1.

    2

    *.example.com

    http://www.123.example.com

    Yes

    See rule 1.

    3

    *example.com

    http://www.123example.com

    Yes

    See rule 1.

    4

    *example.com

    http://www.123.example.com

    Yes

    See rule 1.

    5

    http://www.*.example.com

    http://www.123example.com

    No

    See rule 1.

    6

    www.example.com

    http://www.example.com

    Yes

    See rules 2, 1.

    7

    www.example.com

    https://www.example.com

    Yes

    See rules 2, 1.

    8

    http://www.*.example.com

    http://123.example.com

    Yes

    See rules 2, 4, 1.

    9

    www.example.com

    http://www.example.com/abc

    Yes

    See rules 2, 5, 1.

    10

    example.com

    http://www.example.com

    Yes

    See rules 3, 1.

    11

    http://example.com/

    http://example.com/abc

    Yes

    See rule 6.

    12

    http://example.com/*

    http://example.com

    Yes

    See rule 7.

    13

    http://example.com

    https://example.com

    No

    See rule 8.

    14

    "example.com"

    http://www.example.com

    No

    See rule 9.

    15

    "http://www.example.com"

    http://www.example.com/abc

    No

    See rule 9.

    16

    "*.example.com"

    http://www.example.com

    Yes

    See rules 1, 9.

    17

    "http://www.example.com/*"

    http://www.example.com/abc

    Yes

    See rules 1, 9.

    18

    "www.example.com"

    http://www.example.com; https://www.example.com

    Yes

    See rules 9, 8.

    19

    www.example.com/abc/123

    http://www.example.com/abc

    No

    An address mask contains more data than the address of a web resource.

Page top