When I sit around, gazing at the activity on my site, all of the people searching for “celebrity plastic surgery” or “surgery for celebrities” on google or yahoo seem to come here, I am sometimes amazed by the wide diversity of User Agents that people have.
For those not hip to the HTTP lingo, a “User Agent” is a little bit of text that gets sent along with your request for a web page. When you visit a website, the server logs information about you, including your “User Agent” string. Generally, it has the browser that you are using and the version information. There are really a lot of browsers out there, even though we only really hear about Internet Explorer (and Netscape (and Opera)). In fact, here is my current User Agents list for today (yup, just today): (WARNING: This list is long, so when you get bored, scroll down further)
|
User Agents |
Hits |
|
Baiduspider+(+http://www.baidu.com/search/spider.htm) |
28 |
|
Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker (wn.zyborg@looksmart.net; ht... |
28 |
|
SharpReader/0.9.3.2 (.NET CLR 1.1.4322.573; WinNT 5.0.2195.0) |
19 |
|
SharpReader/0.9.4.0 (.NET CLR 1.1.4322.510; WinNT 5.1.2600.0) |
17 |
|
NewsGator/2.0 (http://www.newsgator.com; Microsoft Windows NT 5.1.2600.0; .NET C... |
17 |
|
Waypath Scout v2.1 - info at waypath dot com |
14 |
|
Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slu... |
13 |
|
SharpReader/0.9.3.1 (.NET CLR 1.1.4322.573; WinNT 5.1.2600.0) |
13 |
|
RssBandit/1.2.0.90 (.NET CLR 1.1.4322.573; WinNT 5.1.2600.0; http://www.rssbandi... |
9 |
|
PubSub.com RSS reader - http://www.pubsub.com/ |
9 |
|
Java/1.4.1_05 |
9 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.coreyhaines.com; Crazy Br... |
9 |
|
SharpReader/0.9.3.2 (.NET CLR 1.1.4322.573; WinNT 5.1.2600.0) |
7 |
|
Mozilla/2.0 (compatible; Ask Jeeves/Teoma) |
6 |
|
SharpReader/0.9.4.0 (.NET CLR 1.1.4322.573; WinNT 5.1.2600.0) |
6 |
|
Feedster Crawler/1.0; Feedster, LLC. |
4 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) |
4 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.2.1.1367) |
3 |
|
ping.blo.gs/1.0 |
3 |
|
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) |
2 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6067C6C9-FBE7-4F28-AC15-F02F... |
2 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1... |
2 |
|
The World as a Blog :: http://brainoff.com/geoblog/ |
2 |
|
BlogShares Bot/1.02 |
2 |
|
libwww-perl/5.69 |
2 |
|
2 |
|
Googlebot/2.1 (+http://www.googlebot.com/bot.html) |
2 |
|
Lynx/2.8.5dev.7 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7 |
2 |
|
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko)... |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Compaq; Rogers Hi-Speed Internet)... |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts) |
1 |
|
Jakarta Commons-HttpClient/2.0final |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98) |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Compaq) |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.c... |
1 |
|
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90) |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; yplus 4.4.01d) |
1 |
|
Frontier/9.0 (WinNT) |
1 |
|
Technoratibot/0.6 |
1 |
|
obidos-bot (weblog bookwatch) |
1 |
|
Java/1.4.2 |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.... |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) |
1 |
|
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) |
1 |
|
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet) |
1 |
So, these little strings show up in my log, and I wonder at all the cool browsers and spiders and aggregators, etc. Now, here and there are little bits of extra information, like “FunWebProducts” and “Rogers Hi-Speed Internet.” Also, there is an entry that has “www.coreyhaines.com” which is, of course, my website. That's my browser sending that user agent. This way, when people look in their logs, they can see my website, perhaps even being curious enough to come visit (not that there is that much interesting stuff here to read).
In any case, the point of this entry is how to add your own custom information to your user agent string. Very easy to do. Since we are on windows, it is probably likely that this is a registry change. Sure enough, we will end up adding something to the registry. Don't know what the registry is? Don't fret, you can find a file to download at the end of this entry which you can use to make the changes yourself. If you want to know more, Winguides.com has a great tutorial on the registry ().
IMPORTANT WARNING AND DISCLAIMER! As always, changing the registry can be dangerous if you do not know what you are doing. Whenever you work with the registry, it is best to make a backup before you do anything. I lay no claim or responsibility if you hurt your registry. And, now, back to the story.
So, the first thing to do is to find out where Internet Explorer stores it User Agent strings. Here's the registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent
Underneath this, there is a “Post Platform” key. You can create strings under this key to contain any information you want. For example, I have two strings (REG_SZ), one named “Crazy Browser 1.0.5” and another named “www.coreyhaines.com.” These are custom strings that get added to your User Agent. All you have to do is create a new REG_SZ string and name it what you want. The value is irrelevant. Presto!
Don't want to manually go in and change your registry by hand? Download this file and just change the to be whatever you want. Don't forget the quotations marks!
custom_user_agent_string.reg (.28 KB)
Disclaimer: I make no guarantees about the safety of this reg file, so use it AT YOUR OWN RISK!