피드로 돌아가기
I lost months of Google indexing to a single missing UA pattern
Dev.toDev.to
Backend

Google-InspectionTool UA 누락으로 인한 인덱싱 실패 해결

I lost months of Google indexing to a single missing UA pattern

Noctias2026년 6월 26일6intermediate

Context

Next.js 15와 Cloudflare Tunnel 기반 환경에서 국가별 법적 규제 준수를 위한 Age-Verification Middleware 운영. 특정 조건의 사용자를 noindex 설정된 /age-verification 페이지로 Rewrite하는 구조에서 Googlebot UA 매칭 로직의 불완전함으로 인한 인덱싱 누락 발생.

Technical Solution

  • /Googlebot/i 정규식 기반의 단순 UA 필터링으로 인한 Google-InspectionTool 매칭 실패 지점 파악
  • Search Console의 Live Test가 사용하는 전용 UA(Google-InspectionTool)를 식별하여 Bypass 로직에 추가
  • 단순 Googlebot 외에 AdsBot-Google, Google-Site-Verification 등 구글 생태계 내 다양한 Fetcher UA를 포함하는 확장된 Allowlist 설계
  • Open Graph 카드 렌더링을 위한 SNS Bot(facebookexternalhit, Twitterbot 등) 및 AI Crawler(GPTBot, ClaudeBot 등)를 포함한 포괄적 Bot Detection 함수 구현
  • 정규식 기반의 UA 매칭을 통해 인터스티셜 페이지(Interstitial Page)를 건너뛰고 실제 콘텐츠에 직접 접근 가능한 경로 확보

- Search Console의 'URL 검사' 결과가 실제 Crawler 동작과 다를 수 있음을 인지하고 Rendered HTML을 직접 확인하십시오. - Bot Bypass 로직 설계 시 단일 UA가 아닌, 서비스 성격에 맞는 광범위한 Bot Allowlist를 구성하십시오. - Geo-blocking이나 Age-gate 적용 시, curl 명령어로 실제 Bot UA를 모의하여 Indexing Pipeline 정상 작동 여부를 검증하십시오.

원문 읽기