Skip to main content
You opened a free ngrok URL and got a page that says “You are about to visit…” instead of your app. Or your frontend loads blank, because its API calls got that page back instead of JSON. Both are the ngrok browser warning, also called the interstitial. ngrok shows it on free endpoints to deter phishing. To get around it, do one of these:

What is the ngrok browser warning page?

It’s a page ngrok serves in front of your app, before a browser’s first request reaches it:
ngrok returns it with the error code ERR_NGROK_6024. Your endpoint and your app are fine. Visitors click Visit and continue to your site.

Why does ngrok show it?

Attackers have used free ngrok endpoints to host phishing pages. The warning tells visitors that ngrok is serving the site before they type a password into it. ngrok added the page to free accounts to cut down on that abuse. The warning isn’t a verdict on whether a site is safe. See Is an ngrok link safe to open? for how to judge a link.

Why does my page load blank, or my API return HTML instead of JSON?

Your frontend is calling a free ngrok endpoint with fetch or a similar client, and ngrok answered with the warning page instead of your API’s response. This one is confusing because nothing reports an error. Your API is up, ngrok is up, and the response is a valid HTML page. It just isn’t the JSON your code expected. You’ll usually see:
  • a page that renders but stays empty, or a loading spinner that never stops.
  • a JSON parse error such as Unexpected token '<' in the browser console.
  • an HTML response in the network tab where you expected JSON.
This happens most often when the frontend runs on a different host, such as localhost or a hosting provider, and calls an API exposed through ngrok. The visitor never clicked Visit on the API’s domain, and cross-origin requests usually don’t send that cookie anyway. To fix it, add the ngrok-skip-browser-warning header to the API requests your frontend makes, as shown in the examples below. For a cross-origin request, the header triggers a CORS preflight, so your API must also include ngrok-skip-browser-warning in its Access-Control-Allow-Headers response header. See Does ngrok support CORS? for adding CORS headers.

Which requests see the warning?

ngrok shows the warning only on free-plan endpoints, and only for GET requests that send a browser User-Agent header. When a visitor clicks Visit, ngrok sets a cookie that suppresses the warning on that domain for 7 days. Requests from that browser to the same domain, including your app’s own same-origin fetch calls, then go straight through. Webhook providers don’t send a browser User-Agent, so they never see the warning.

How do I skip the warning on the free plan?

Send one of these headers from the client:
  • ngrok-skip-browser-warning, set to any value.
  • A non-standard User-Agent, such as MyApp/0.0.1, in place of the browser’s default.
Use the first one in code you write:
To skip the warning in your own browser, install a browser extension that adds the header or changes the User-Agent. See Removing the interstitial page for an example extension and more client examples.

How do I remove the warning for everyone?

Upgrade to any paid plan. Paid endpoints don’t show the warning to any visitor. On the free plan, nothing you configure removes it for visitors whose browsers you don’t control. If you’re putting a demo or a site in front of customers and the warning is a problem, the free plan isn’t the right fit.

Can I add the skip header with Traffic Policy or the agent?

No. The add-headers action doesn’t let you add the ngrok-skip-browser-warning header or change the User-Agent header. The header has to come from the client making the request.

What if I still see the warning after adding the header?

Open your browser’s network tab, select the request to your ngrok URL, and confirm its request headers include ngrok-skip-browser-warning. If the browser reports a CORS error instead of the warning, your API’s Access-Control-Allow-Headers response is missing ngrok-skip-browser-warning. If the header is there and the warning still shows, email support@ngrok.com with your endpoint URL and the error code ERR_NGROK_6024.