Skip to end of metadata
Go to start of metadata

Redirection Notice

Icon

Regex support in URL Severity Mapping allows to address 2 popular use cases which appear when so called "reversed mapping" is applied. The idea of reversed severity mapping is that we add 2 mapping rules:
 
1) Map HTTP status errors to Fatal for important URLs (originating from main domain or a sub-domain, e.g. mydomain.com, sub1.mydomain.com):
   - URL pattern: *mydomain.com*
   - Code pattern: * // by default the wildcard means "any bad HTTP status code" or "n/a"
   - Severity: Fatal
2) Map HTTP status errors on any other URL to Warning.
   - URL pattern: *
   - Code pattern: *
   - Severity: Warning
 
It works fine except one case: when a 3rd party URL refers your domain (mydomain.com) in a GET parameter, e.g. http://3rd.party.ad.com/?origin=mydomain.com. Then the first rule would catch errors on this URL, but this is not what you want. Of course, you can modify the first rule like this:
   - URL pattern: http://mydomain.com*
   - Code pattern: * // by default the wildcard means "any bad HTTP status code" or "n/a"
   - Severity: Fatal

but then you would need to add a rule for each sub-domain. Also when new sub-domain appears, you should add new rule.
 
Since WPM 8.4 (Released 2016-04-18) is is possible to instead configure the first rule as:
   - Url Pattern Type: regex
   - Url pattern: ^https?:\/\/(www\.)?([a-zA-Z0-9-_]+\.)?mydomain\.com.*
   - Code pattern: *
   - Severity: Fatal