imagemeta-tagsrobots.txttwitter-card

Twitter meta image is not rendering on Twitter because it "may be restricted by the site's robots.txt file"


So this is the link while I tried using Twitter the image somehow doesn't work, while it works for Facebook.

It is working for Facebook only but for Twitter I am getting issue:

WARN: The image URL https://scontent.xx.fbcdn.net/v/t31.0-8/19388529_1922333018037676_3741053750453855177_o.jpg?_nc_cat=0&oh=ba7394f2a6af68cb4b78961759a154f1&oe=5B6BC349 specified by the 'twitter:image' metatag may be restricted by the site's robots.txt file, which will prevent Twitter from fetching it.

Dont know what is causing this here is my robots.txt:

User-agent: *
Disallow: /translations
Disallow: /manage
Disallow: /ecommerce

Here is the link to replicate the issue: https://invoker.pvdemo.com/album?album=1422199821384334&name=gallery


Solution

  • Your robots.txt is only relevant for your URLs. For an image hosted at https://scontent.xx.fbcdn.net/, the relevant robots.txt is https://scontent.xx.fbcdn.net/robots.txt.

    Currently, this robots.txt blocks everything:

    User-agent: *
    Disallow: /
    

    As documented under URL Crawling & Caching, Twitter’s crawler (Twitterbot) respects the robots.txt:

    If an image URL is blocked, no thumbnail or photo will be shown.