Preview image and headline don't show when sharing to social media like FB

Hi,

Suddenly, only some of my pages show the correct preview with image and headline that I have made with Yoast SEO backend. It seems like the new pages don’t work.

Doesn’t work:



Work:


Facebook debug says I should allowlist facebookexternalhit in my robots.txt file. If that was the issue, this problem should be present everywhere on my site, correct?

Everything is up to date. I’m suspecting classic Cornerstone usage and WPML, because these new pages were made by using old template sections. Or what do you think? I definitely need to fix this because I can’t promote myself now to make new websites with Pro Theme. Please advise.

Kindly,
Angela

Hey @Lobsterass,

Thanks for reaching out!

Upon checking the pages, it does work when sharing the link to Facebook.

Hope that helps.

1 Like

Hey @marc_a yes! My web hotel initially told me that I already had a robots.txt file but I didn’t. That’s why I wrote you guys. When we allowlisted facebookexternalhit in robots.txt all pages suddenly started working.

Thank you for replying!
<3

FOR ANYONE ELSE WHO NEEDS TO MAKE A ROBOTS.TXT FILE, HERE’S WHAT’S IN IT. Place it in the root folder.

User-agent: *
Disallow: /wp-content/uploads/wc-logs/
Disallow: /wp-content/uploads/woocommerce_transient_files/
Disallow: /wp-content/uploads/woocommerce_uploads/
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
User-agent: facebookexternalhit
Allow: /images

START YOAST BLOCK

---------------------------

User-agent: *
Disallow:

Sitemap: https://YOURSITE.COM/sitemap_index.xml

---------------------------

END YOAST BLOCK

Hey @Lobsterass,

We’re glad that it is now working properly on your end.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.