Control LinkedIn Link Previews with Open Graph Meta Tags
Configure Open Graph meta tags so LinkedIn shows the correct title, description, and image when visitors share your pages.
21 Nov 2026, 13:43 UTC

The problem
When a visitor pastes your page URL into LinkedIn, LinkedIn fetches the page and builds a preview card. If your HTML lacks Open Graph tags, LinkedIn may guess the title, description, and image—or show nothing useful. A logged-in LinkedIn user can still share the URL, but a weak preview can reduce clicks and misrepresent your content.
Useful takeaway
You do not need a LinkedIn developer app or access token for basic link previews. Open Graph is a standard that lets web pages declare metadata such as title, description, and image for social platforms. Add standard Open Graph HTML meta tags to the destination page, then open LinkedIn's public share composer with that URL. LinkedIn's crawler reads the tags and fills the composer. Automated posting on behalf of members requires a separate app and is not covered here.
Desired outcome
A site visitor clicks a Share on LinkedIn button, the LinkedIn post composer opens pre-filled with your page URL, and the card shows the intended title, description, and image. The visitor authenticates with LinkedIn before publishing.
Prerequisites
- The destination page is publicly reachable over HTTPS and returns HTTP 200.
- LinkedIn's crawler can fetch the page; it is not blocked by robots.txt or authentication.
- The page HTML contains og:url, og:title, og:description, and og:image meta tags.
- The share trigger is user-initiated, such as a button click.
Add Open Graph tags
Place these tags inside the <head> element of the destination page. Replace the placeholder values with your own.
<meta property="og:url" content="https://example.com/blog/linkedin-sharing" />
<meta property="og:type" content="article" />
<meta property="og:title" content="How to share pages on LinkedIn" />
<meta property="og:description" content="Configure Open Graph tags so LinkedIn previews show the right title, description, and image." />
<meta property="og:image" content="https://example.com/images/linkedin-preview.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
og:type tells LinkedIn what kind of object the page represents. og:image:width and og:image:height are optional but help LinkedIn reserve space for the preview image. Use an image that is publicly accessible and at least 1200 by 630 pixels for best results.
Create the share trigger
Add a button or link that opens LinkedIn's sharing URL. The visitor must be logged into LinkedIn to publish.
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fexample.com%2Fblog%2Flinkedin-sharing"
target="_blank"
rel="noopener noreferrer">
Share on LinkedIn
</a>
Where to run: edit your site's source code locally or on the server, then deploy the changed HTML. Required permissions: write access to the page template or CMS field that renders the <head>. Expected check: clicking the button opens a new tab with LinkedIn's composer. Risk: an incorrectly encoded URL can break the composer; encode the full destination URL as a query parameter.
Verify the HTML tags
Run this from a terminal on your local machine or build server. You need read access to the deployed page or the ability to fetch it over the network.
curl -I https://example.com/blog/linkedin-sharing
curl https://example.com/blog/linkedin-sharing | grep -E 'og:(url|title|description|image)'
Expected checks: the first command returns HTTP/2 200 or HTTP/1.1 200 over HTTPS. The second command prints the four Open Graph lines. If either command fails, fix the deployment or server configuration before testing LinkedIn.
Test the LinkedIn preview
- Open the destination page in a browser where you are logged into LinkedIn.
- Click the Share on LinkedIn button.
- Confirm the composer opens with the correct URL.
- Confirm the title, description, and image match the Open Graph tags.
- Cancel the post unless you intend to publish it.
If you are logged out, LinkedIn prompts for login before showing the composer. That is expected behavior for the public sharing path.
Common failures and fixes
| Symptom | Likely cause | Check or fix |
|---|---|---|
| Blank or fallback preview | LinkedIn crawler cannot reach the page | Confirm the page is public over HTTPS and not blocked by robots.txt or a login wall. |
| Wrong title or description | Missing or incorrect Open Graph tags | Inspect the page source for og:title and og:description. |
| No image shown | Image unreachable, too small, or wrong format | Open the og:image URL directly. Use JPEG or PNG, publicly accessible, ideally 1200x630. |
| Stale preview after edits | LinkedIn caches Open Graph data | Use LinkedIn's official URL inspector to refresh the cached metadata, then retest. |
Limitations
- This path is for user-initiated sharing only. Do not use it to automate member posts or scrape LinkedIn data.
- LinkedIn caches previews. Tag changes may not appear immediately in the composer.
- Preview rendering, supported tags, and cache behavior can change with LinkedIn platform updates. There is no version pinning.
- Pages behind authentication or blocked from crawlers produce blank or fallback previews.
Practical way to check the result
After deploying the tags, paste the page URL into LinkedIn's post composer manually or click your share button. If the card shows the expected title, description, and image, the integration is working. If it does not, inspect the page source, confirm HTTPS 200, and refresh the cache through LinkedIn's URL inspector before concluding the tags are wrong.
Recovery
This change only edits HTML meta tags. If a new tag causes a problem, remove or comment out the Open Graph block and redeploy the previous version of the page. LinkedIn's cache may still show the old preview until it refreshes.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.