(Created on )

Puppeteer: Navigation to {value} is blocked by blocklist/allowlist rules

The URL is blocked by the configured browser allowlist/blocklist.


The URL is blocked by the configured browser allowlist/blocklist.

Error message

Navigation to {value} is blocked by blocklist/allowlist rules

{value} is replaced by the value shown in your error message.

How this error happens

A navigation can be refused because the URL does not match the connection’s allowed destinations. Here, the policy allows one site but navigation requests another.

The failing snippet uses an imported puppeteer instance and a Chrome/CDP endpoint. The correction uses the still-open page.

const browser = await puppeteer.connect({
    browserURL: "http://127.0.0.1:9222",
    allowlist: [
        "https://example.com/*",
    ],
});

const page = await browser.newPage();

await page.goto(
    "https://other.example/"
);

How to fix

Navigate to a URL allowed by the policy. If the intended destination is legitimately missing, update the policy deliberately when creating the connection.

await page.goto(
    "https://example.com/"
);

Things to keep in mind

Redirects can lead to a blocked destination. Inspect the actual URL before expanding a rule, and do not remove all restrictions just to make navigation succeed.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →