facebookexternalhit
Last reviewed
facebookexternalhit is the bot Meta uses to fetch a page when its link is shared, so it can build the preview. Meta lists it on its web crawlers page.
| Operator | Meta |
|---|---|
| Type | Link preview bot |
| User agent contains | facebookexternalhit |
| Purpose | Not documented by the operator |
| robots.txt | Not documented by the operator |
| Runs JavaScript | Not documented by the operator |
| How to verify it | Not documented: no published IP list or reverse DNS rule. Prebaked reports its visits as unverified. |
| Official documentation | developers.facebook.com/docs/sharing/webmasters/web-crawlers |
What it sees on a JavaScript site
Meta does not document whether facebookexternalhit runs JavaScript, and no published measurement covers it. What is safe to say: a link preview needs the page title, description and Open Graph tags. If your app adds those tags with JavaScript, a bot that does not run scripts will not find them, and the preview comes out blank or generic. Putting the tags in the HTML response works either way.
How to allow or block it in robots.txt
Prebaked's sources do not document how facebookexternalhit handles robots.txt. If you block it, links to your site may be shared without a preview. If it follows robots.txt, a rule names it by its token, facebookexternalhit.
# Block facebookexternalhit from the whole site
User-agent: facebookexternalhit
Disallow: /
# Or allow it everywhere
User-agent: facebookexternalhit
Allow: /
robots.txt controls whether a bot may fetch a page. It does not change what the bot sees once it fetches it. For the full syntax, see robots.txt.
How Prebaked serves it
Your Prebaked integration looks at the User-Agent header of each request. When it contains facebookexternalhit, the request gets the rendered HTML of your page from Prebaked: the same content a visitor sees after the scripts run. Every other visitor gets your site directly. Prebaked does not change the content for crawlers. The visit shows up in your request log as unverified, because facebookexternalhit cannot be checked by IP. For a link preview this means the title, description and Open Graph tags are in the HTML, even when your app sets them with JavaScript.
To see what a bot that does not run JavaScript gets from your page, run the free checker. The full list of bots Prebaked serves is on Crawlers.
Can AI search cite your site? Check it free
FAQ
Does facebookexternalhit run JavaScript?
Not documented. Meta does not publish this. Put the content and meta tags that matter in the HTML response, and the answer stops mattering.
How do I block facebookexternalhit in robots.txt?
A group with User-agent: facebookexternalhit and Disallow: / is the standard way. Whether facebookexternalhit obeys it is not documented in Prebaked's sources.
Can I verify that a visit is really from facebookexternalhit?
Not reliably. The operator publishes no IP list or reverse DNS rule for facebookexternalhit, so a user agent that says facebookexternalhit could come from anyone. Prebaked still serves the rendered page, and reports these visits as unverified.