# LinkedInBot: LinkedIn Link Preview Bot User Agent

> LinkedInBot reads a page when someone shares its URL on LinkedIn, to build the link preview. User agents, Open Graph tags and robots.txt.

LinkedInBot is the bot that LinkedIn uses to read a page when someone shares its URL on LinkedIn. It reads the title, description and image for the link preview. If you want correct previews, let LinkedInBot fetch your pages and add Open Graph tags.

## User agent

LinkedIn's help pages that we found do not name the user agent. Cloudflare Radar lists [LinkedInBot](https://radar.cloudflare.com/bots/directory/linkedin) as a verified bot for link previews, with two user agents:

```
LinkedInBot/1.0 (compatible; Mozilla/5.0; Apache-HttpClient +http://www.linkedin.com)
```

```
LinkedInBot/1.0 (compatible; Mozilla/5.0; +http://www.linkedin.com)
```

Bot lists also record `Jakarta Commons-HttpClient/3.1` in place of `Apache-HttpClient` ([crawler-user-agents](https://github.com/monperrus/crawler-user-agents)). The robots.txt token is `LinkedInBot`.

## Tags that LinkedIn reads

The LinkedIn help article [Make your website shareable on LinkedIn](https://www.linkedin.com/help/linkedin/answer/46687) lists four Open Graph tags that must exist: `og:title`, `og:image`, `og:description` and `og:url`. Put them in the ` ` of each page:

```html

```

For the image, LinkedIn gives a minimum size of 1200 x 627 pixels, a ratio of 1.91:1 and a maximum file size of 5 MB. For the tag syntax, see the [Open Graph tags guide](/html-tags/open-graph-meta-tags/) and the [og:image guide](/html-tags/og-image/).

## Refresh a preview

LinkedIn keeps a cached copy of the preview data. If you change the tags, paste the URL into [Post Inspector](https://www.linkedin.com/post-inspector/). LinkedIn says that the new data applies only to new posts that include the URL. Posts that already exist keep their old preview ([LinkedIn help](https://www.linkedin.com/help/linkedin/answer/a6233775)).

Post Inspector also shows when LinkedIn last updated its data about a URL ([LinkedIn Engineering](https://www.linkedin.com/blog/engineering/product-design/post-inspector-a-tool-to-optimize-content-sharing)).

## Block or allow LinkedInBot

LinkedIn does not say in the pages that we found whether LinkedInBot reads robots.txt. If you want to ask it not to fetch your pages, add this group to `/robots.txt`:

```
User-agent: LinkedInBot
Disallow: /
```

If your file blocks all bots with `User-agent: *` and you want LinkedIn previews, add a group that allows LinkedInBot:

```
User-agent: LinkedInBot
Allow: /
```

Firewalls and bot protection can also stop LinkedInBot. LinkedIn says that a missing preview image can mean that your website blocks LinkedIn from pulling the image. LinkedIn publishes no IP list that we found.

## Other link preview bots

Other platforms use their own bots for previews. See [facebookexternalhit](/ai-crawler-bot/facebookexternalhit/), [Twitterbot](/ai-crawler-bot/twitterbot/), [Slackbot](/ai-crawler-bot/slackbot/) and [Discordbot](/ai-crawler-bot/discordbot/). A robots.txt group for LinkedInBot does not change how these bots or search engines treat your site.

---

[View the canonical page](https://aichatwatch.com/ai-crawler-bot/linkedinbot/) · [Browse llms.txt](https://aichatwatch.com/llms.txt)
