Реферальна програма →
Глосарій

User-Agent

HTTP-заголовок, що ідентифікує браузер, версію та операційну систему, які роблять запит.

User-Agent - це рядок, який ваш клієнт надсилає в HTTP-заголовку User-Agent, щоб відрекомендуватися: браузер, версія, рушій рендерингу й операційна система. Реальний Chrome на Windows надсилає щось на кшталт «Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ... Chrome/120.0». Сервери читають його, щоб вирішити, який контент і форматування повернути.

Для скрапінгу user-agent - часта точка виявлення. HTTP-бібліотеки за замовчуванням надсилають очевидні ботові user-agent (наприклад, «python-requests/2.31»), які антибот-системи флагують миттєво. Надсилання реалістичного браузерного user-agent - базова вимога, щоб не бути заблокованим одразу.

Окрім просто встановлення одного реалістичного значення, ротація user-agent між запитами допомагає трафіку мати вигляд безлічі різних користувачів. Але user-agent має узгоджуватися з рештою запиту - заявляти, що ви Chrome, надсилаючи заголовки чи TLS-відбиток, які Chrome ніколи б не надіслав, - червоний прапорець, який просунуті системи виявляють.

User-agent - один сигнал із багатьох. Поєднуйте реалістичний, ротований user-agent зі співставними заголовками Accept і Accept-Language, узгодженим TLS-відбитком і ротацією IP. Підміна одного лише user-agent, коли все інше кричить «бот», далеко вас не заведе проти сучасних антибот-захистів.

A string that has to agree with everything else

The User-Agent header is a self-reported description of your browser and operating system. It is trivially editable, which is why no serious anti-bot system trusts it on its own. What those systems do instead is check whether it agrees with everything they can measure independently.

The list of independent measurements is long. The TLS handshake produces a fingerprint that differs between Chrome, Firefox and a Python library. The order of your HTTP headers differs between real browsers and most automation tools. JavaScript exposes the screen size, the platform, the font list, the number of CPU cores and the graphics renderer. The TCP stack itself has an operating-system flavour.

A request claiming to be Chrome on Windows while presenting a Python TLS fingerprint, sending headers in the wrong order and reporting a Linux platform in JavaScript is not a browser. Sites do not need to guess. The contradiction is arithmetic.

This is why changing the User-Agent alone almost never helps, and occasionally hurts: a mismatched string turns a consistent automated client into an inconsistent one, which is the pattern detection systems are actually built to find.

Where the proxy fits into fingerprint consistency

The address is one signal among many, and it has to agree with the others. On mobile modems you can also align the network stack:

Set the modem fingerprint to match the profile

# Supported values on our mobile modems:
android:1   android:3
ios:1       ios:2
macosx:3    macosx:4
windows:1

# An iPhone profile behind a modem announcing Windows
# contradicts itself before any script runs.
  • Match the proxy country to the profile locale and timezone. A US address with a Warsaw timezone is a contradiction visible in one line of JavaScript.
  • On mobile, set the OS fingerprint when you create the profile and leave it. Changing it later looks like the device was replaced overnight.
  • Let your antidetect browser generate the User-Agent rather than typing one. Hand-written strings drift out of date and stop matching the browser version behind them.
  • A proxy fixes the address. Fingerprint consistency is a separate job, and the two have to be solved together to be worth anything.

What the User-Agent will and will not do

Changing it does not make you a different browser

Everything measurable stays the same, and now it disagrees with your claim.

Mobile User-Agent without a mobile address

Claiming an iPhone from a datacenter range is a contradiction that costs nothing to detect.

A blocked request is rarely about the string

Most blocks are decided on address reputation and TLS fingerprint. The header is the last thing checked, not the first.

Rotating User-Agents per request

Real browsers keep theirs. A session where the browser changes identity every request is more suspicious than one that repeats.

Дивись на практиці

Готовий використовувати user-agent?

SotaProxy надає доступ до ротуючих резидентських, мобільних, дата-центр та ISP проксі. Без мінімальних платежів.

Почати