This feature is experimental and its behavior may change in future releases.
Restricting navigation
Use theallowedDomains field in browserSettings when creating a session to specify which domains are permitted. Below are examples in both Node.js and Python SDKs.
- Node.js
- Python
Limitations:
- Subdomain matching: Adding
example.comalso permitswww.example.com,a.b.example.com, and any other subdomain. You do not need to list subdomains separately. - Top-frame navigation only: Browserbase checks top-frame navigations. It does not block iframe/subframe loads or in-page resource requests (images, scripts, XHR, etc.).
- HTTP(S) domains only: Browserbase does not apply the allowlist to navigations to
about:blank,chrome://,file://, and similar URLs.