My User Agent Is:
CCBot/2.0 (https://commoncrawl.org/faq/)
Websites use User Agents for a Few Interesting Reasons:
- Better Viewing: They adjust the website to fit your screen size.
- Make Sure Everything Works: They check if your browser can handle certain features.
- Tracking Popular Devices: Websites learn what devices people use the most.
- Stopping Bad Guys: They can spot suspicious activity and block it.
What Does a User Agent Look Like?
A user agent is a string of words and numbers that looks like this:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/91.0.4472.124 Safari/537.36
This might look confusing, but it's actually saying:
- You're using Google Chrome version 91.0.
- Your computer runs Windows 10.
- The browser uses WebKit to show web pages.
How to Find Your User Agent
Want to see your user agent? Here's how:
- Open your browser and type
navigator.userAgent
in the console. - Visit a site like this one whatismybrowser.ca.
- Ask a website owner to check their logs.
Can You Change Your User Agent?
Yes, you can! Sometimes people want to pretend they're using a different device or browser. This is called "spoofing." It can help:
- View websites meant for other devices.
- Get past browser-specific limits.
- Test how a website looks on different browsers.
Examples of Browser User Agents
Browser | User Agent Example |
---|---|
Google Chrome | Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/91.0.4472.124 Safari/537.36 |
Mozilla Firefox | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Firefox/90.0 |
Apple Safari | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/537.36 |
Microsoft Edge | Mozilla/5.0 (Windows NT 10.0; Win64; x64) Edg/91.0.864.59 |
Final Thoughts
A browser user agent is a handy little thing that helps websites work better for you. Now that you know what it is, you can even try changing it or checking what yours says!
Want to learn more? Check out this guide from Mozilla.