Customizing website monitor User-Agent
By default, StatusGator sends monitoring requests using a single User-Agent string, currently based on that of the command-line tool Curl, but subject to change from time to time. Some websites or APIs behave differently—or block requests—based on this header. Customizing the User-Agent ensures your monitors work correctly and simulate the traffic you want.
Why customize the User-Agent?
- Bypass filters or allowlists — Some services only respond to specific User-Agents.
- Simulate devices — Test how your site behaves when accessed from mobile or desktop browsers.
- Avoid bot blocking — Prevent monitoring traffic from being misclassified as automated bots.
- Improve logs — Identify monitoring traffic more easily by assigning it a custom User-Agent.
How to customize the User-Agent
- Go to the Monitors page.
- Find your website monitor and click the three-dot menu (⋮) > Configure.
- Open the Settings tab and scroll to the HTTP headers section.
- Enter:
- Name:
User-Agent
- Value: the User-Agent string you want to use (for example, a browser, mobile device, or custom identifier).
- Name:
To make requests appear as if they are coming from a Samsung Galaxy S22 5G, enter:
Mozilla/5.0 (Linux; Android 13; SM-S901B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36
- Click Save.
Other example User-Agent strings
- Google Chrome (Windows 10)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.110 Safari/537.36
- Firefox (macOS)
Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4_1) Gecko/20100101 Firefox/118.0
- Safari (iOS 17)
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1
- Microsoft Edge (Windows)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.110 Safari/537.36 Edg/116.0.1938.62
- Android WebView (Pixel 6)
Mozilla/5.0 (Linux; Android 13; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.5845.110 Mobile Safari/537.36
Best practices
- Use the same User-Agent as your users if you want realistic monitoring results.
- Avoid overly generic values like
Mozilla/5.0
which can lead to inaccurate readings. - If you want to track monitoring traffic in your server logs, set a unique User-Agent string.