I lost months of Google indexing to a single missing UA pattern
How the Google-InspectionTool user-agent silently broke our adult-site indexing, and the one-line middleware fix that recovered it.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 4002098) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Noctias Posted on Jun 26 I lost months of Google indexing to a single missing UA pattern #webdev #javascript #devops #security tl;dr — If your site has any kind of geo-gate, age verification, or country-specific wall, and you wrote a "let Googlebot through" rule in your middleware: your rule is probably wrong. Google's URL Inspector does not send a Googlebot UA. It sends Google-InspectionTool.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).