Skip to main content
  • Type: Record<string, string>
Some URLs are accessible from multiple domainsβ€”for example, due to staging and production environments or hosting platforms like Netlify. Use this parameter to define key-value pairs that replace one hostname with another during crawling. The key is the hostname to replace, the value is its replacement.
Keys must match hostnames exactly. You can’t use wildcards.
The crawler replaces hostnames when it encounters a matching URLβ€” whether in sitemaps, page links, canonical tags, or redirects. For example, with { "dev.example.com": "example.com" }, https://dev.example.com/solutions/voice-search becomes https://example.com/solutions/voice-search. The crawler extracts records from the rewritten URL and continues from there, not the original. The mapping doesn’t apply to URLs listed in configuration variables, such as: The mapping also doesn’t apply to the content extracted from a page. For example, if you extract text that includes the hostname to be replaced, the original text is extracted.

Examples

JavaScript
{
  hostnameAliases: {
    "dev.example.com": "example.com",
  },
}
⌘I