Skip to main content
Version: v0.x

Match both root and www requests

In some cases, you may want a Route to match incoming requests to the root domain and the corresponding www subdomain.

Instead of creating a separate Route for each one, we can supply alsoMatchWWWSubdomain to match both root and www subdomain requests. This Route will send both* and* to Route["to.url"].

const routes = [
from: { pattern: "*", alsoMatchWWWSubdomain: true },
to: { url: "" },