Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

I checked 95 well-known sites for broken link previews. 14% had none at all.

I checked the link-preview tags on 95 well-known sites. Under half were clean, and nine sites developers use constantly have no preview tags at all. If you have ever pasted a link into Slack and got a bare grey URL inst

I checked the link-preview tags on 95 well-known sites. Under half were clean, and
nine sites developers use constantly have no preview tags at all.

If you have ever pasted a link into Slack and got a bare grey URL instead of a title
and image, this is why.

The result

Of 95 sites, 79 responded to an automated check (the rest blocked it). Of those 79:

count share
Perfect (100/100) 38 48%
Missing og:title 18 23%
Missing og:image 15 19%
No preview tags whatsoever 11 14%
og:image that returns an error 1 1%

Nine sites with zero preview tags

Each of these was re-checked by hand with a real Chrome user-agent to rule out
bot-blocking. All returned HTTP 200 with no og:* and no twitter:* tags:

  • news.ycombinator.com
  • python.org
  • swift.org
  • ruby-lang.org
  • arxiv.org
  • jstor.org
  • arstechnica.com
  • trello.com
  • replicate.com

Hacker News having no link preview is almost a design statement. python.org,
swift.org and ruby-lang.org are harder to explain β€” those are the front doors of
three major languages, and every share of them renders as a naked URL.

The subtler failure

Missing tags are at least honest. The nastier case is tags that look fine but point
at an image that no longer loads β€” you keep sharing links believing the preview works,
because you never see what other people see. One site in the sample had exactly this.

Worth knowing: og:image needs an absolute URL. A relative path silently produces
no image on most platforms, and nothing in your own browser will ever warn you.

Method, and where it is weak

  • 95 sites chosen for recognisability across dev tools, languages, SaaS, news, reference and community β€” not a ranked top-N list.
  • Homepages only. Deeper pages often have tags the homepage lacks, so this measures the front door, not the whole site.
  • 16 sites blocked the automated request. Blocked is reported as unknown, not as a score of zero β€” conflating "we could not check" with "this is broken" is the easiest way to produce a wrong number, and I hit that bug while building this.
  • Two sites were dropped from the final list: one was rate-limited, and reddit.com returned 403 and 200 on different attempts, so its result was not stable enough to publish.

Check your own

I wrote the checker as an open-source tool. It validates Open Graph and Twitter Card
tags, confirms the preview image actually loads, and also checks robots.txt and
sitemap.xml. Free, no signup:

There is also a GitHub Action, so a build can fail when a page ships without a valid
preview β€” which is the only way I know to stop this regressing quietly.

If you run it on your own site and get a surprising result, I would genuinely like to
hear it β€” especially any false positives, since that is the part I most want to fix.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.