The LinkedInBot

The LinkedInBot is a scraper used by the social network linkedin to gather information about URLs that are shared in posts or messages. It is used for example to display the preview of a link in a post.

As of April 2024, the Linkedin bot has the following user-agent: LinkedInBot/1.0 (compatible; Mozilla/5.0; Apache-HttpClient +http://www.linkedin.com)

It operates from IP addresses that belong to the LinkedIn Corporation autonomous system (AS). For example, IP = 108.174.5.113.

How can I verify if LinkedInBot is really coming from Linkedin?

As usual, relying solely on the user-agent to authenticate a good bot is really risky as this field can be modified by any attack. Instead you can either verify that:
  • Either the user-agent is linked to the LinkedInBot and the autonomous system is LinkedIn Corporation ;
  • Or you can run a reverse DNS (more details below) to verify the ownership of the IP address.

How can I use reverse dns to verify if an IP belongs to Linkedin?

You can run a reverse dns using the host command.

For example, to test the IP 108.174.5.11:

host 108.174.5.11

It returns the following output:113.5.174.108.in-addr.arpa domain name pointer 108-174-5-113.fwd.linkedin.com.

As you see in the previous example, we see the substring linkedin.com which indicates that this IP belongs to linkedin. This can safely be used to authenticate the LinkedinBot.

Other recommended articles

How to securely authenticate Google Read Aloud requests

In this article, we discuss what's Google Read Aloud, how you can authenticate its requests and ensure that it doesn't access paywalled content.

Read more

Published on: 02-06-2024

What is the Facebook external hit user agent?

This article goes into the details of the facebookexternalhit user-agent. Does it always come from Facebook crawler? When is it linked to iMessage link preview? We explain how you can verify if a request comes from Facebook or if it comes from a different application.

Read more

Published on: 05-05-2024

Go HTTP Client

This article provides about the go-http-client/x.x user agent. It is linked to Go HTTP client, an HTTP(s) client implemented in Golang that can be used to make requests from a Golang program.

Read more

Published on: 01-05-2024