Facebook link cache/preview suddenly not working. #2067
-
Shlink version4.0.0 PHP version8.3.3 How do you serve ShlinkSelf-hosted Apache Database engineMySQL Database version8.0.36 SummaryHi all! So - installed shlink over Christmas to replace rebrandly and it's been brillant! Up until last weekend i've added my shortened links onto Facebook and they've 'translated' fine into the redirected links (text and image etc). Now it no longer wants to cache/preview the links correctly. It will not work with new short links, and older short links show a cached redirected link from a while back (I update them regularly). This seemed to coincide with a bit of drama I had with Lets Encrypt on the box which I had to redo all the certificates on the box including the one used for my shlink site. I've been using the Facebook Sharing Debugger to try and make some sense out of this problem: https://developers.facebook.com/tools/debug/ ...and I notice that any of my shortlinks show the same error:
The weird thing is though, my short links still work fine to use normally and even translate OK on Twitter fine like they used to on Facebook. I can also see the requests from the Facebook 'scrapers' in the Apache logs looking all good:
I'm not exactly sure what happened - so was wondering if anyone else was experiencing the same or had any pointers? Could it be something to do with the Lets Encrypt certs, or is that a coincidence? I followed the guidance in Step 6 from this document for Lets Encrypt config: https://www.linuxbabe.com/ubuntu/install-shlink-url-shortener-ubuntu-20-04-server I also upgraded to v4 from v3.7.1 and still the same issue. Let me know if you need any more info! Thanks, Jack |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I'm seeing the same thing after upgrading from an old version of shlink to 4.0.3, and then to 4.1.0 this morning. Same thing. I'm seeing the 301 log hits from Also seeing the same if I try to create the post either directly through Facebook or through Buffer. Either way it doesn't seem to get what it needs. Link was originally pointing to Gumroad, so I changed it to the same product on TpT to try to parse out whether it was a Gumroad issue. Same problem after changing. Tried with a new short link to example.com and same issue. I went through the
Haven't had an issues with LetsEncrypt, so we don't have that in common. Also happening on a server running 4.0.3 and 3.6.3. |
Beta Was this translation helpful? Give feedback.
-
Hoping this is related: https://developers.facebook.com/support/bugs/1085796049211789/ Looks like the there is a Just ran a query to update all the links to crawlable and will see if that takes care of it. Seems like it should. Now it's just a waiting game for Facebook to download and recache Edit: That seems to have done the trick. I put the URL for |
Beta Was this translation helpful? Give feedback.
Hoping this is related: https://developers.facebook.com/support/bugs/1085796049211789/
Looks like the there is a
robots.txt
route in shlink that disallows everything, except short links where you've clicked crawlable. Those are added torobots.txt
. Not sure why you wouldn't want your short links crawlable since they're just redirect.Just ran a query to update all the links to crawlable and will see if that takes care of it. Seems like it should.
Now it's just a waiting game for Facebook to download and recache
robots.txt
and see if that clears it up.Edit:
That seems to have done the trick. I put the URL for
robots.txt
into the Meta sharing debugger to get it crawled and then waited a bi…