Facebook Debugger lint tool gets HTTP 206 - doesn't detect Open Graph meta tags (others tools do)

耗尽温柔 提交于 2019-11-28 13:46:02

Facebook is seeing HTTP code 206 "Partial Content" instead of normal 200 "OK".

206 "Partial Content": This message might occur if a client has a partial copy of content in its cache and requests and update of missing content. This message indicates that the partial request succeeded.

I found one old forum post about it: http://forum.developers.facebook.net/viewtopic.php?id=68440

It looks like it might be a server configuration issue to do with caching. Do you run Varnish or anything like that on your server? Check in to that.

Another thing to try might be to move your charset meta tag below your Open Graph tags, so Facebook knows the right encoding to parse them with. Also, using this type tag might work better:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Finally, make sure you don't have anything blocking the Facebook scraper user agent. As mentioned in their documentation:

Our bot functions with the User Agent "facebookexternalhit/*". Make sure you're not blocking that user agent. Also, make sure Facebook's servers can reach your server.

If You are using Varnish:

Put

if (req.http.user-agent ~ "facebookexternalhit")
{
  return(pipe);
}

Inside your sub vcl_recv:

sub vcl_recv
{
}

It worked very well.

We use Varnish so this did the trick for us:

if (req.http.user-agent ~ "facebookexternalhit")
    {
    return(pipe);
    }

https://www.varnish-cache.org/lists/pipermail/varnish-misc/2011-February/020060.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!