网站链接在WhatsApp无预览求助:Facebook与LinkedIn预览正常
Hey there! Let's figure out why your link preview works on Facebook and LinkedIn but not on WhatsApp. I've dealt with this exact issue a bunch of times, so here are practical fixes to try:
Double-check your Open Graph (OG) tags
WhatsApp can be pickier about OG tags than other platforms. Make sure your page's<head>section includes these essential tags with correct values:<meta property="og:title" content="Your Page's Clear Title"> <meta property="og:description" content="A concise, engaging description of your page"> <meta property="og:image" content="https://your-domain.com/path/to/your-image.jpg"> <meta property="og:url" content="https://your-domain.com/exact-page-url">Critical notes: The
og:imagemust be a direct HTTPS link (no redirects, no hotlink protection), and the image should ideally be 1200x630 pixels (the aspect ratio WhatsApp prefers for previews).Fix HTTPS & cache problems
WhatsApp only crawls HTTPS links, so ensure your site is fully secured with HTTPS. Also, WhatsApp caches previews aggressively—if you recently updated your OG tags, try:- Adding a random query parameter to the end of your link (like
?refresh=1) to bypass the cache - Sending the link to a different WhatsApp account or restarting the app to trigger a fresh crawl
- Adding a random query parameter to the end of your link (like
Ensure your server allows WhatsApp's crawler
WhatsApp uses the same crawler user agent as Facebook:facebookexternalhit/1.1. Check your server logs to confirm this agent gets a 200 OK response when accessing your page. Also, make sure yourrobots.txtfile doesn't block this user agent.Validate the link with Facebook's Debug Tool
Since WhatsApp shares Facebook's crawling engine, using Facebook's link debugger will show you exactly what's wrong—whether tags are missing, images are unaccessible, or there's a crawl error. It even lets you refresh the crawler's cache for your link.Avoid dynamic OG tags
If your OG tags are generated dynamically with JavaScript, WhatsApp's crawler might not pick them up. These tags need to be static in the HTML source code so the crawler can read them immediately without executing JS.
内容的提问来源于stack exchange,提问作者Om Agarwal

