Skip to content
FunnelGuard

Fix guide by FunnelsGuard

og:image blocked by robots.txt or hotlink protection: fix

SEO-238Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

The og:image tag tells social platforms which picture to show when someone shares your link. The platform sends its own crawler (for example facebookexternalhit, LinkedInBot, Twitterbot or Slackbot) to download that image. If the crawler is refused, the preview has no picture.

Why it costs you leads or sales

A link with a large image usually looks more trustworthy and takes more space in a feed than a bare text link. Without it, your posts, ads shared as organic posts, email-to-chat shares and WhatsApp or Slack messages look plain and are easier to scroll past. The impact is usually low, but it hits every share of every page the rule covers.

How a blocked og:image loses the preview
  1. Link sharedSomeone pastes your URL
  2. Crawler fetches pageog:image tag is found
  3. Crawler fetches imagerobots.txt or hotlink rule returns 403
  4. Preview cardShown with no image
  5. Click-throughFewer people notice the link

The page loads fine, but the crawler cannot download the image.

How to check if your site has it

Test whether crawlers can reach your image
  1. Copy the og:image URL

    View the page source and search for og:image. Copy the full URL in the content attribute.

  2. Read your robots.txt

    Open yourdomain.com/robots.txt. Look for Disallow lines that match the image path, under User-agent: * or the specific bots.

  3. Request the image like a crawler

    Run the curl command below. Anything other than 200 and an image content type is a problem.

  4. Use the platform debuggers

    Paste the page URL into the Facebook Sharing Debugger and the LinkedIn Post Inspector. They report if the image could not be downloaded.

Fetch the image with a social crawler user agentbash
curl -I -A "facebookexternalhit/1.1" https://example.com/images/share.jpg
# Also try with a fake referrer to test hotlink rules:
curl -I -A "Twitterbot/1.0" -e https://other-site.example/ https://example.com/images/share.jpg

How to fix it

First remove or narrow any robots.txt rule covering the image. Then relax hotlink protection so social crawlers can load it. The exact menus depend on your platform and host.

robots.txt: allow the share imagetext
User-agent: *
Disallow: /assets/private/
Allow: /assets/images/share/

User-agent: facebookexternalhit
Allow: /
Unblock the image by platform
  1. Check Settings > Reading

    Make sure the search engine visibility box is not ticked, as it can add a restrictive robots.txt.

  2. Check SEO plugin robots editor

    In Yoast SEO (Tools > File editor) or Rank Math (General Settings > Edit robots.txt) remove any Disallow for /wp-content/uploads/.

  3. Check hotlink settings

    Look in your security plugin, host control panel (cPanel Hotlink Protection) or CDN. Add social crawlers or allow empty referrers.

nginx: allow empty referrers and your own domainnginx
location ~* \.(jpg|jpeg|png|webp)$ {
  valid_referers none blocked server_names *.example.com;
  if ($invalid_referer) { return 403; }
}
Share image access

Blocked

  • robots.txt disallows /uploads/
  • Hotlink rule returns 403 to crawlers
  • Shared links show text only

Open

  • Image path allowed in robots.txt
  • Empty referrers accepted
  • Shared links show the full picture

How to confirm it's fixed

Verify the preview
  1. Re-run curl

    Both commands should now return 200 with an image content type.

  2. Re-scrape in the debuggers

    Use Facebook's Sharing Debugger (Scrape Again) and LinkedIn's Post Inspector to refresh their cache.

  3. Share a test link

    Paste the URL in a private Slack channel or message to yourself and check the image appears.

How to prevent it happening again

Keep previews working
  • Review robots.txt after every migration, redesign or SEO plugin change
  • Keep share images in one folder exempt from blocking rules
  • Test hotlink changes with the curl referrer command before saving
  • Re-check the Facebook and LinkedIn debuggers after launching key pages
  • Add the share image test to your launch checklist

How FunnelGuard handles this

FunnelGuard does not check this yet. Testing whether social crawlers can fetch an og:image is a possible future check, but it is not part of the product today.

What FunnelGuard does cover is the journey that matters more for revenue: a robot visitor runs your lead forms, checkouts and booking or chat buttons on a schedule, checks tracking hits and confirms test leads arrive. Until an image check exists, watch for this manually. Run the curl test and the Facebook and LinkedIn debuggers after each site change, or use a crawler such as Screaming Frog, which can report images blocked by robots.txt.

Frequently asked questions

The most common questions are answered below.

Questions people ask

Why is my og:image not showing when I share my link?

The image is often blocked or missing. Common causes are a robots.txt rule covering the image folder, hotlink protection returning a 403, a wrong URL, or a cached old result. Test the image URL with curl and the Facebook Sharing Debugger.

Does robots.txt block Facebook from fetching my og:image?

Facebook's crawler, facebookexternalhit, can be affected by robots.txt rules that disallow the image path. If the image folder is disallowed, the preview may show no picture. Add an Allow rule for the image or remove the Disallow.

How does hotlink protection break social previews?

Hotlink protection serves images only when the request comes from your own site. Social crawlers fetch the image directly with no matching referrer, so the server returns a 403 or a placeholder. Allow empty referrers or exempt the share image path.

How do I test if a crawler can access my og:image?

Run curl -I with a crawler user agent, such as facebookexternalhit/1.1, against the image URL, and repeat with a fake referrer. You want a 200 status and an image content type. The Facebook Sharing Debugger and LinkedIn Post Inspector also show download errors.

Do I need to allow Twitterbot and LinkedInBot in robots.txt?

Only if a rule blocks them. By default, bots are allowed unless a Disallow matches. Make sure no wildcard rule blocks your share image, and add specific Allow lines if needed.

Why does the image still not show after I fixed robots.txt?

Platforms cache previews. Use Scrape Again in the Facebook Sharing Debugger or re-inspect the URL in LinkedIn's Post Inspector to force a refresh.

Does FunnelGuard check if my og:image is blocked?

No. FunnelGuard does not check this yet, and it is a possible future check. You can test it manually with curl and the social debuggers.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.