Technical SEO
Important
Back Button Hijacking
priority_high Why it matters
JavaScript that intercepts the back button and redirects users violates Google's spam policy (enforced June 2026). Google says sites that violate its spam policies may rank lower in results or not appear in results at all.
search What we check
Whether inline JavaScript intercepts the browser's back button (popstate event) and redirects users instead of allowing normal back-navigation.
build How to fix
- 1 Remove any popstate event listeners that perform redirects (location.href, location.replace, window.location assignments).
- 2 Review third-party ad scripts and tag managers - back-button hijacking often originates from ad platforms, not first-party code.
- 3 Legitimate SPA routing (React Router, Vue Router, Next.js) updates the view on popstate but never redirects away - this check will not flag it.
- 4 If the script comes from a third-party, contact them or replace it with a compliant alternative.