1 min read

User Agents Hitting My Site

Paul Kinlan

Paul Kinlan

Lead of Chrome DevRel

I've always wanted to know which user agents are currently hitting my site... Am I getting crawled? Are ML bots sifting through my site?

I added some middleware to my site to log the user agents hitting it, while using Vercel's KV to store the user agents and their counts. New agents are only admitted up to a fixed budget each minute, so a burst of bots can't flood the store with garbage.

If you are interested in the code, the middleware and the api are both on GitHub.


Recently admitted user agents

User Agent Count

Stay in the loop.

I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.

alternate_email

Get in touch

Open to chat about Chrome or Web development.

Book a consultation