You are here: Home → Table of contents → Common Patterns → Executing a user script on a domain and all its subdomains
4.1. Executing a user script on a domain and all its subdomains
Many sites work equally well whether you include the www.
prefix in the address or not. If you want to write a user script for such sites, you need to make sure to catch both versions
of the address.
Example: Metadata tags to match a domain and all subdomains
// ==UserScript==
// @include http://example.com/*
// @include http://*.example.com/*
// ==/UserScript==