Facebook debug returns 403 Forbidden

可紊 提交于 2019-12-11 02:59:46

问题


I am trying to run my URL through Facebook's Debugger to see if I have setup the correct meta tags, and also, to see that stuff works in general.

When I put my URL in, I get a 403 Forbidden in return.

The URL is to a subdomain, and the domain itself also returns 403 Forbidden.

Reading another post Facebook links to my site resolve as 403 forbidden, I think that my host might have setup a block or something, however, I can't seem to recreate the block from my computer.

I have been trying to spoof the referrer and the user agent, but without luck. Before calling my host, what could I have missed?

If it's of relevance the URL in question is: http://distorpia.dadiugames.dk/


回答1:


The command I use to test this issue is curl -i -H 'Accept: */*' -H 'Range: bytes=0-40960' -H 'Connection: close' -A 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' http://whatever.com - this includes some of the headers sent by the Facebook crawler that some hosts have problems with

Looks like your hosting setup can't handle one/some of those headers properly - I replicated the 403 error:

For your URL, this returned:

HTTP/1.1 403 Forbidden
Date: Tue, 13 Dec 2011 20:54:07 GMT
Server: Apache/2.2.6 mod_auth_kerb/5.3 PHP/5.2.17 mod_fcgid/2.3.6
Accept-Ranges: bytes
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Parallels H-Sphere</title>

{{REMOVED THIS PART}}

    <h2>Error 403: Forbidden</h2>

<p>You don't have permissions to access this page.
This usually means one of the following:</p>
<ul>
<li>this file and directory permissions make them unavailable from the Internet.</li>
<li>.htaccess contains instructions that prevent public access to this file or directory.</li>
</ul>
<p>Please check file and directory permissions and .htaccess configuration if you are able to do this.
Otherwise, request your webmaster to grant you access.</p>


来源:https://stackoverflow.com/questions/8494059/facebook-debug-returns-403-forbidden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!