Skip to content

User-Agent

An HTTP request header that informs the server about the client: browser, OS version, and program type.

Example

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36

Why Important for Automation

Servers and WAF often block requests with non-standard User-Agent: python-requests, curl, and similar are filtered as bots. Spoofing to a browser header helps bypass protection.

How to Set in Python

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
}
requests.get(url, headers=headers)

See Also

← All Terms