Scheduled broken-link and redirect checks that tell you the moment a link breaks — linkbruno.com
You publish a post, paste the link into Slack or LinkedIn, and instead of a nice card with a title and image you get a bare URL. Or a card with no image. Or, worst of all, the image from a completely different page.
Link previews are built from your page's Open Graph and Twitter Card tags, fetched by each platform's bot. When they go wrong, it's almost never the platform's fault. It's usually one broken URL in your <head>, and it's very fixable.
How previews work
When a link is shared, the platform's crawler requests your page, reads tags like these:
<meta property="og:title" content="How we cut build times in half"> <meta property="og:description" content="A short summary that shows under the title."> <meta property="og:image" content="https://www.example.com/images/og/build-times.png"> <meta property="og:url" content="https://www.example.com/blog/build-times/"> <meta name="twitter:card" content="summary_large_image"> Then it fetches the image, resizes it, and caches the result, often for days. Each step is a place where things fail.
Step 1: see what the bot sees
Don't debug in your browser; you're logged in, you have cookies, and you're not a bot. Request the page the way a crawler would:
curl -sL -A "Slackbot-LinkExpanding 1.0 (+https://api.slack.com/robots)" https://www.example.com/blog/build-times/ \ | grep -iE '<meta[^>]+(og:|twitter:)' If nothing comes back, the tags aren't in the HTML the server sends. Then check the image URL itself:
curl -sI -A "facebookexternalhit/1.1" https://www.example.com/images/og/build-times.png You want 200, an image/png or image/jpeg content type, and a reasonable content-length.
The platforms also have their own inspectors: Facebook's Sharing Debugger, LinkedIn's Post Inspector, and the card preview in X's post composer. Use them to see what each platform has cached.
The usual causes
1. The tags are added by JavaScript. If your app sets meta tags client-side (React Helmet in a pure SPA, for example), most preview bots never see them, because they don't run JavaScript. The tags have to be in the server-rendered or pre-rendered HTML.
2. The image URL is relative. content="/images/og.png" works in some places and fails in others. The Open Graph spec expects an absolute URL. Always generate it from your site's base URL, including https://.
3. The image is a broken link. A renamed file, a hashed asset from an old build, an image on a CDN path that changed. The page loads fine, so nobody notices. The preview just quietly loses its image.
4. The bot is blocked. A WAF, bot-protection rule, Cloudflare challenge or robots.txt that blocks unknown user agents will stop preview bots. Look for 403s or challenge pages for user agents like facebookexternalhit, Slackbot, LinkedInBot, Twitterbot, Discordbot and WhatsApp. Images on a separate domain with hotlink protection fail the same way.
5. The image is too big or the wrong shape. Very large files (several megabytes) or unusual formats may be skipped. 1200×630 pixels, PNG or JPEG, a few hundred kilobytes, is the safe default across platforms. SVG generally doesn't work for previews.
6. The redirect chain is too long, or goes through a login. If the shared URL redirects several times, or the page redirects bots to a consent or login page, the bot reads the tags of the page it ended up on: often a generic page with your homepage image.
7. The platform cached an old version. Previews are cached aggressively. If you fixed the tags after the first share, the platform may keep showing the broken version. Use the platform's inspector to re-scrape. For stubborn caches, change the image URL itself (for example og.png?v=2), because the image is often cached separately from the page.
The og:image URL is a link like any other, and it breaks like any other. linkbruno.com checks your site's links and images on a schedule, so a moved or deleted preview image shows up in a report instead of in a sad, imageless card on launch day.
A quick check for every page
To check a list of URLs at once, extract og:image from each page and request it:
while read -r url; do img=$(curl -sL "$url" | grep -oiE '<meta[^>]+property="og:image"[^>]+>' | grep -oiE 'content="[^"]+"' | head -1 | cut -d'"' -f2) if [ -z "$img" ]; then echo "NO og:image $url"; continue; fi code=$(curl -s -o /dev/null -w '%{http_code}' "$img") [ "$code" != 200 ] && echo "$code $img (from $url)" done < urls.txt It assumes property comes before content in the tag, which is how most templates write it. It's rough, but it finds the relative URLs, the missing tags and the 404 images in a few seconds.
Stop it from happening again
- Generate OG tags in the server-rendered template, from one base URL setting, never by hand.
- Fail the build if a page has no
og:imageor if the referenced file isn't in the build output. - Allow preview bots through bot protection, by verified bot lists where your provider has them rather than by user agent alone.
- Include og:image URLs in your link checks. They're links that no visitor clicks directly, which is exactly why they rot unnoticed. A scheduled check with linkbruno.com or your own crawler should treat them like any other image.
Messaging apps are a little different
Discord, WhatsApp, Telegram and iMessage generate previews too, and they're stricter in different ways. WhatsApp is known to skip images that are too large, so keep the preview image small. Some messaging apps fetch the preview from the sender's device rather than from a central server, so a page that blocks certain networks or requires a cookie consent click can fail for some senders and work for others. If a preview works in Slack but not in WhatsApp, check image size and any interstitial pages first.
Related reading
- Moving your blog from Medium (or Substack, or Hashnode) to your own domain? An 11-point checklist so the links survive
- How to find and fix broken images on a website
- '0 broken links found' is a myth: 7 places link checkers don't look
- LinkedIn returns 999, Cloudflare returns 403: why your link checker reports links that aren't broken
- How to fix net::ERR_BLOCKED_BY_CLIENT (when an ad blocker breaks your images, scripts and links)
Which platform gives you the most trouble with previews? LinkedIn's cache has cost me more time than all the others combined.
