Every so often when I go to share a page from my client’s site on LinkedIn, I get a “Cannot display preview. Try another link.” error message. What causes it and how can I fix it so i can post with a proper preview?
The very first time that LinkedIn sees a page URL, it grabs some key information from the page and saves it so that subsequent user links can include a preview image and other information without having to go back to the site itself. This is known as caching and is one reason that the Web is a lot faster than it was a decade ago. Facebook and other services do the very same thing to speed up user interaction. That’s the upside. The downside is that if at the moment LinkedIn queries the remote site there’s a glitch or hiccup, that error can be “stuck” in the LinkedIn cache forever. No bueno.
This means that even if you wait a few hours and try again, you’ll still see that error message even though the site is back to full functionality; the error has been cached. But there’s a secret programmer way to remove the cache entry and have LinkedIn try again. Not only that, but it will also show you exactly what data it found when it visited the page you want to get that preview for! Let’s have a look…
First off, here’s the kind of LinkedIn error we’re talking about:
The text in red says Cannot display preview. You can post as is, or try another link. Frustrating!
There’s nothing you can do here on the regular LinkedIn interface to fix the problem. This link is now in bad-preview limbo forever. Unless you go to the LinkedIn Post Inspector! Open a new tab and go here:
It will show you an input box without much explanation:
As suggested, enter that same link you’re trying to preview on your post and click “Inspect“. It will reach out again, ignoring the cache, and grab the data it seeks on the page. Didn’t work? Try again. If you have recurring problems, however, it’s probably the remote site that’s the problem, not LinkedIn!
Once LinkedIn Post Inspector can finally scrape the data it wants from the site, it’ll use that to reset the system cache for all of LinkedIn. Nice, fixed for everyone. The information shown is really interesting too, and great for checking to ensure that everything on the site is working properly.
It’ll even show you what you’ll see if you use this link in a LinkedIn post:
Much better than no preview, right?
Below that is more information, the URL info and redirect trail for my post:
The redirect trail is particularly interesting if you’re posting a news article or even copying a shortened bit.ly URL or similar, as it’ll automatically expand to the original base URL of the source article, not share the shortened version. The “canonical” URL, by the way, is the “official” version of the URL according to the remote site. Some sites notably e-commerce sites, have the same content on multiple URLs, but then have one official link for ’em all.
Turns out that LinkedIn is using what’s known as open graph information, the same metadata that Facebook and Twitter use to build a preview of a Web link. Every modern Web site should have this information embedded and properly formatted. Post Inspector shows what it cares about further down the page:
Oops. I don’t have publish date specified, which I should probably fix on my site. More importantly, notice that the metadata includes a description and image URL. Both are critical to social links working correctly so if you don’t see this for your own pages, call your Webmaster and get it fixed. If your client’s Web site doesn’t included this sort of information, that’s something they need to deal with too, and pronto!
Once Post Inspector shows a good preview, you’re done. Close that tab and try your LinkedIn post again. As you can see, there’s now a valid and attractive preview included:
Now don’t forget to add a hashtag or two to help your post be findable!
Turns out that Facebook also has a post inspector too, if you’re curious. It’s known as the Sharing Debugger and it’s also quite interesting to explore…
Pro Tip: I’ve been writing about LinkedIn since the early days. Please do check out my extensive LinkedIn help pages while you’re visiting. Thanks!