How It Works
The extension checks the allowed domains list before:- Auto-applying debug parameters when navigating
- Persisting parameters across page loads
- Injecting content scripts
- Showing the badge count
- Auto-modifying links on the page
Automatic Domain Addition
The extension automatically adds domains to your allowed list when you:- Toggle parameters via keyboard shortcuts - When you use a keyboard shortcut to add a parameter, the current domain is automatically allowed
- Toggle parameters via context menu - When you right-click and add parameters via the context menu, the domain is automatically allowed
- Toggle parameters via the popup - When you enable a parameter from the extension popup, the domain is automatically allowed
background/background.js:345-358:
The automatic addition happens in the background. You don’t need to manually add domains unless you want to pre-authorize them.
Manual Domain Management
You can manually add or remove domains from the settings page.Adding Domains
- Open the extension settings (right-click icon → Options)
- Navigate to the Settings tab
- In the Allowed Domains section, add one domain per line
- Click Save Settings
Removing Domains
- Open the extension settings
- Delete the domain line from the Allowed Domains textarea
- Click Save Settings
Resetting All Domains
To clear all allowed domains:- Open the extension settings
- Click Reset to Defaults
- Confirm the reset
Subdomain Handling
The extension uses suffix matching for subdomains. This means:- Adding
example.comallowsexample.com,www.example.com,staging.example.com, etc. - Adding
staging.example.comonly allowsstaging.example.comand its subdomains likeapp.staging.example.com
Matching Logic
Frombackground/background.js:366-375:
- Converts the hostname to lowercase for case-insensitive matching
- Checks if the hostname exactly matches an allowed domain
- Checks if the hostname is a subdomain of an allowed domain
Examples
| Allowed Domain | Will Match | Won’t Match |
|---|---|---|
example.com | example.comwww.example.comstaging.example.comapp.staging.example.com | example.orgnotexample.com |
staging.example.com | staging.example.comapp.staging.example.com | example.comwww.example.comprod.example.com |
app.hubspot.com | app.hubspot.com | hubspot.comwww.hubspot.com |
Storage Format
Domains are stored in the extension’s sync storage as an array:- Stored in lowercase
- Trimmed of whitespace
- Validated to ensure they’re not empty
options/options.js:132-137:
Common Use Cases
HubSpot CMS Developers
If you develop on HubSpot CMS, you’ll want to add:- Preview domains (
*.hs-sites.com) - Published domains (if using
*.hubspot.comor*.hubspotcms.com) - App platform pages
Multiple Client Sites
For agencies managing multiple client sites:hs-sites.com to cover all preview domains.
Development Environments
For testing across different environments:While you can add
localhost, the extension typically only works on http:// and https:// URLs. Local HubSpot development isn’t common, but the extension will work if you’re proxying HubSpot pages.Security Considerations
The allowed domains list is a security feature that:- Prevents unintended modifications - The extension won’t modify URLs on non-HubSpot sites
- Reduces performance impact - Content scripts and parameter checking only run on allowed domains
- Protects sensitive sites - Banking, email, and other sensitive sites won’t be affected
Related
- Extension Settings - Configure other extension preferences
- Persist Across Sessions - Learn how domain whitelisting enables parameter persistence
- Debug Mode - Understand what parameters the extension manages