Back-Button Hijacking and Ad Code: What Publishers Must Check Before Adding Any Ad Network
A visitor arrives from search, presses Back and stays where they are, or lands on a page of ads they never opened. Google calls this back button hijacking and treats it as spam. The page that gets judged is yours, even when the code that did it came from someone else.
What Google’s policy says
- Google announced the policy on 13 April 2026 and began enforcing it on 15 June 2026, as part of its malicious practices rules.
- It covers sites that interfere with browser navigation, for example by manipulating history, so that a visitor cannot use Back to return straight to the page they came from.
- Google’s announcement says some cases come from a site’s included libraries or advertising platform, and asks site owners to remove or disable whatever is responsible.
- Affected pages may get a manual action or an automated demotion. After fixing a manual action you can request reconsideration in Search Console.
- An FAQ added on 23 November 2026 says you can keep working with advertising platforms and loading their code. Google acts on pages that actually show the behaviour.
So the question to ask is not “does this network offer popunders?” but “what does its code do on my page when a visitor presses Back?” You can answer that yourself.
The checklist: before you add any ad network
1. Ask the network in writing
Ask whether any of its formats adds or replaces history entries, listens for Back, or shows an ad when a visitor tries to leave. Ask which formats, and whether the behaviour can be switched on from the network’s side without you changing your code.
2. Search the script
Download the file your page will load and look for the calls that touch history:
curl -s "https://AD-HOST/script.js" -o ad-script.js
grep -noE "pushState|replaceState|popstate|onpopstate|history\.(back|go)|beforeunload" ad-script.jsA match is not proof of abuse, since single-page apps use these calls for ordinary navigation, so ask what each one is for. No match is not proof of safety either: minified code can hide a method name, and a script can load further scripts.
3. Watch it run
On a test page, add this above the ad tag, then open the browser console:
<script>
['pushState', 'replaceState'].forEach(function (name) {
var original = history[name];
history[name] = function () {
console.warn('history.' + name + ' called', arguments, new Error().stack);
return original.apply(this, arguments);
};
});
</script>
<!-- the ad network's script goes AFTER this -->Any warning shows who called, in the stack trace. Code running inside an iframe has its own history object that this wrapper does not see, which is why the next step matters most.
4. Press Back once, the way a visitor would
- Open your test page by clicking a link to it from another page.
- Let the ad load, then scroll and tap or click the page at least once.
- Press the browser’s Back button once.
- You pass only if you land on the previous page in that one press.
- Repeat for every format, on a desktop browser and on a real phone.
Do not skip the tap. Browsers such as Chrome may skip history entries that were added before the visitor interacted with the page, so a test with no interaction can look clean when it is not.
5. Test with live ads, not only the tag
An ad can carry its own code. Reload your test page several times so you see different creatives, and check again after a few days.
6. Check what happens to your own tab
A popunder or popup should open a new window and leave the page your visitor is reading where it was. If your tab changes address on its own, or opening one ad window leads to another, remove the zone.
7. Keep a record
Note the date, the formats, the browsers and the result. If Search Console later reports a manual action, you will know what changed since your last clean test. If a network’s code fails, remove it first and argue about it second.
How we checked our own ad code
On 4 December 2026 we ran this on the AdsBender publisher tag.
- Source search. The publisher tag, the verification snippet and the scripts for our animated offer formats contain no call that writes to or moves through history, and no Back button listener.
- Runtime test. We loaded Popunder, Interstitial, Page Bar and In-Page Push one at a time on a local test page, at desktop width and at an emulated 375 px phone width. We recorded no history calls, the history length did not change, and one Back returned to the previous page every time.
- Control. A page that deliberately added a history entry did trap the first Back press, so the test can fail.
What this does not cover: the test used a plain placeholder ad, the phone was emulated rather than a physical device, and our test browser blocked the popunder window itself, so we observed the publisher’s page and not the contents of that window. Other formats were checked by source search only. Run step 4 on your own site, and if an ad shown through AdsBender ever misbehaves, tell us on the Report an ad page. Our rules are on Ad Quality & Policy.