2

Not a huge issue for anyone using my site but those who are checking errors logs but for months, Facebook has been requesting an image on our server which hasn't existed since December 2012. I'd understand if it was a piece of content but the actual image it's requesting was part of an old design.

This is just a selection from today:

[Mon Aug 19 11:08:00 2013] [error] [client 173.252.73.116] File does not exist: /var/www/r/img
[Mon Aug 19 11:08:00 2013] [error] [client 69.171.234.113] File does not exist: /var/www/r/img
[Mon Aug 19 11:08:01 2013] [error] [client 173.252.73.119] File does not exist: /var/www/r/img
[Mon Aug 19 11:08:01 2013] [error] [client 69.171.234.117] File does not exist: /var/www/r/img
[Mon Aug 19 15:23:19 2013] [error] [client 69.171.224.119] File does not exist: /var/www/r/img
[Mon Aug 19 15:23:19 2013] [error] [client 69.171.224.118] File does not exist: /var/www/r/img

The Image (and User Agent):

grep 173.252.73.116 /var/log/apache2/access.log
"173.252.73.116" - - [19/Aug/2013:11:08:00 +0100] "GET /r/img/elem/fptv.jpg HTTP/1.1" 404 1126 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

As I said, this is only an inconvenience but I was wondering if there was any way to invalidate URLs with Facebook?

I apologize if this is the wrong site to ask on, I was torn between here and Server Fault.

1
  • If I understand Apache correctly, you could also make an .htaccess file that denies access to that location. I think this will prevent requests from that location from being logged. There may also be a way in .htaccess to prevent logging of specific requests. I know it's easily accomplished in nginx with location blocks.
    – Paul
    Commented Aug 20, 2013 at 0:09

1 Answer 1

1

You could try a 410 (Gone), but as long as the URL is still referenced somewhere in the FB it is potentially still going to get requested.

You could try blocking the "facebookexternalhit" user agent in robots.txt from crawling this specific folder. This should at least stop the requests, as FB does honour robots.txt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.