Exclude URLs from Analysis

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard
Not for use with personal data

With Watcher, you can exclude URLs from being scanned by using

Using the exclude API prevents any URL that matches any pattern in the array from being analyzed.

JavaScript or TypeScript Example

axe: {
  excludeUrlPatterns: [ 'https://*.example.com/**', 'https://example.org/**' ]
}

Java Example

AxeWatcherOptions options = new AxeWatcherOptions();
// Exclude login pages and admin dashboard
options.setExcludeUrlPatterns(new String[] {
    "https://example.com/login*",
    "https://example.com/admin/*"
});

Examples of Excluding URLs

URL Pattern Excluded?
https://example.com/index.html example.com False
https://example.com/index.html https://*mple.com/index.html True
https://example.com/index.html https://example.com False
https://example.com/index.html https://*.example.com False
https://example.com/index.html https://*.example.com/** False
https://example.com/index.html https://*example.com/** True
https://example.com/index.html https://** True
https://example.com/index.html https://* False
https://example.com/index.html ** True
https://example.com/index.html *example.com/index.html False
https://example.com/index.html *example.com/** False
https://example.com/index.html */example.com/** True
https://example.com/index.html htt*/** True
https://example.com/index.html h*/example.com/** True
https://test.example.com/index.html https://*example.com/** True
https://test.example.com/index.html https://*.example.com/** True