Facebook isn't crawling my site [closed]

2019-08-06 03:18发布

问题:

When I publish link of my site to facebook, it's now showing thumbnails and it's showing my old site's titles. I just added opengraph code to my site, but that don't help. When I check my site in facebook debug, it shows Response code: 403. I guess this means that my site is blocking facebook bots, but I don't see how is this possible. Since recently everything worked fine. If this is the case, can you tell me how to unblock it...

http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fracunovodstvo.com.ba

回答1:

I did some digging and and it seams as Facebook actually get a 403 response. Here is what i did:

$ nc -l -p 8000 > fbbot-request
listening on [any] 8000 ...

Run the debugger on http://mydebughost:8000 and I get:

connect to [78.108.54.9] from out-fc245.tfbnw.net [66.220.153.245] 48731
$ cat fbbot-request 
GET / HTTP/1.1
User-Agent: facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
Host: mydebughost:8000
Accept: */*
Accept-Encoding: deflate, gzip
Range: bytes=0-40960
Connection: close

Now change the Host header to racunovodstvo.com.ba and do the request:

$ cat fbbot-request | nc racunovodstvo.com.ba 80 | head
HTTP/1.1 403 Forbidden
Date: Sat, 31 Dec 2011 14:29:48 GMT
Server: Apache
Last-Modified: Mon, 02 May 2011 07:52:14 GMT
ETag: "444007-1094-4dbe62ae"
Accept-Ranges: bytes
Content-Length: 4244
Connection: close
Content-Type: text/html

And after some more digging it seams as the web server get confused by the Range: bytes=0-40960 header.