Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Chrome Extension Host Permissions in Manifest V3: Four Patterns That Actually Fit

Choose the right Manifest V3 access pattern: persistent host access, permission requests on demand, static content-script targeting, or temporary access after a user action.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Manifest V3, choose host access based on when and where your extension needs to work: declare required sites in host_permissions, request optional sites when needed, target static scripts with content_scripts.matches, or use activeTab for a user-triggered action on the current tab. These approaches are not interchangeable, and the available official examples do not verify eight published Chrome Web Store extensions.

How do you declare host permissions in Manifest V3?

Put site URL patterns in host_permissions when the extension needs ongoing access to those sites. Put API permission names—such as scripting—in the separate permissions array. For sites the extension may access only after the user opts in, declare patterns in optional_host_permissions and request access at runtime.

As an Amazon Associate I earn from qualifying purchases.

A required-access manifest can look like this:

{
  "manifest_version": 3,
  "name": "Example extension",
  "version": "1.0",
  "permissions": ["storage"],
  "host_permissions": ["https://example.com/*"]
}

The pattern is a host scope, not an API permission. Chrome’s permission documentation explains the manifest fields and warns that adding or changing host access can prompt users. Request the narrowest scope that supports the feature.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which of the four patterns fits your extension?

Pattern When access happens Target sites known in advance? Typical use
host_permissions Persistent access to declared sites Yes Core features that need site access without a fresh user gesture
optional_host_permissions After the extension requests access and the user grants it Usually; requestable patterns are declared A feature users choose to enable for particular sites
content_scripts.matches Automatically, on matching pages, subject to the declared setup Yes Static content scripts that should run on specified sites
activeTab with scripting Temporarily after a user action on the current tab No broad site list is needed for that action One-off page actions initiated by the user

1. Required access: host_permissions

Use this when the extension’s core behavior needs access to known sites as part of its normal operation. This is the appropriate home for required host patterns; do not put those URL patterns in permissions as if they were API names.

2. Ask only when a feature needs access: optional_host_permissions

Declare patterns the extension can request, then make the permission request when the user invokes the relevant feature. This gives the user a choice about access instead of requesting every capability at install time. Chrome recommends optional permissions where the functionality allows. The field became available to Manifest V3 extensions in Chrome 102, announced April 4, 2022; see the Chrome for Developers announcement.

3. Run a static script on selected pages: content_scripts.matches

Use content_scripts.matches to say where a statically declared content script should run. It is a script-targeting field, not a general substitute for host permissions needed by other host-sensitive APIs. Chrome’s content scripts guide distinguishes static declarations from dynamic registration and programmatic injection. Changes to content-script matches, like changes to host permissions, can trigger a warning.

4. Act on the current tab after a user gesture: activeTab

If a feature acts only when a user clicks the extension or otherwise invokes it, activeTab can grant temporary access to the current tab. Pair it with scripting when injecting a script programmatically. This avoids requesting persistent access to a broad list of sites for a one-off action. Google’s Focus Mode sample shows a Manifest V3 manifest declaring activeTab and scripting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How are host permissions different from content_scripts.matches?

content_scripts.matches targets pages for automatic execution of statically declared content scripts. host_permissions declares host access for extension capabilities that need it beyond that static targeting. A matching pattern in one field should not be assumed to grant every kind of host access through the other.

For example, Google’s Web Accessible Resources Demo manifest uses content_scripts.matches for three example Glitch hosts. That illustrates static targeting; it does not establish that the sample is a published store extension or that its configuration fits another extension’s needs.

Do dynamic content scripts create another permission field?

No. Static declarations, dynamic registration, and programmatic injection are ways to manage when scripts are added or run; they are not additional host-permission manifest fields. The access decision still depends on the feature: a script that must work on known sites may need declared host access, while a user-triggered injection on the current tab may be able to use activeTab. The Chrome Extensions scripting API sample demonstrates dynamic declarations and programmatic injection.

Do all extensions need host permissions?

No. An extension that does not access site content or use a host-sensitive capability may not need host patterns. Google’s Chrome Prompt AI Demo manifest declares the sidePanel API without host permissions, illustrating that host access is feature-dependent.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Are there eight verified shipped Chrome extensions in these examples?

No. The verified examples here are official Google sample extensions and manifests; the available evidence does not establish eight extensions with current Chrome Web Store listings or publication status. Treat them as code examples, not as a verified set of shipped products. The official Chrome Extensions samples repository is useful for inspecting sample implementations, but a repository entry alone does not confirm store publication.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.