Reputation: 23552
I used the facebook debugger to check my page and it shows me Response Code 404
but for me it works.
curl works
I tested with browser and curl (from other server). GET and POST return HTTP/1.1 200 OK
:
curl -i http://www.mypage.de/stuff/test.html
curl -i -X POST http://www.mypage.de/stuff/test.html
Page is valid
I check my test.html using http://validator.w3.org/ and got This document was successfully checked as XHTML + RDFa!
Response header
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:497
Content-Type:text/html
Date:Mon, 10 Mar 2014 16:13:15 GMT
ETag:"28a0b29-353-4f4429866eebc"
Keep-Alive:timeout=5, max=99
Last-Modified:Mon, 10 Mar 2014 15:52:48 GMT
Server:Apache/2.2.22 (Debian)
Vary:Accept-Encoding
Why does facebook get a 404?
Update
If I look at access logs all request reach the server but the 404 access come from default instead of the correct virtual host.
If I use the IP in facebook instead of dns it works normal.
Upvotes: 2
Views: 332
Reputation: 23552
Turned out it was a DNS problem after all. We changed the primary and secondary DNS from our own to the hosters and after one day it worked.
Upvotes: 0
Reputation: 1246
the default vhost is used, if the hostname of the machine is equivalent to the request hostname. You can set ServerName somethig-different-from-hostname
in the default vhost or disable the default vhost with a2dissite default
to prevent this
Upvotes: 1
Reputation: 424
You should check the server logs if you have a hit like
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
Its likely that your .htaccess is blocking the Facebook crawler.
Upvotes: 1