A few days ago, our customer encountered issues with Facebook URLs, resulting in a bad HTTP response code (403) when attempting to share links on the Facebook platform. We encountered this issue on WordPress, as well as Custom CMS (Content Management System), Shared hosting, and other cloud hosting sites.
We conducted extensive research on platforms such as Stack Overflow, as well as various forums including the Facebook Bug Forum and Facebook Community Forum. Many website owners experienced similar issues and struggled to find a resolution. After 28 hours of continuous research, we were able to identify and resolve the issue. This article details the solution to the problem of Facebook URLs returning a bad HTTP response code.
Facebook debugger tools shows 403 bad response code. If Facebook is returning a 403 HTTP response code when trying to access a URL, it means that Facebook’s crawler is being denied access to that particular URL. A 403 status code indicates “Forbidden,” meaning that the server understood the request but refuses to authorize it. This could be due to various reasons including :
We perform following steps to resolve the issues –
Check Robots.txt: Ensure that your website’s robots.txt file isn’t blocking Facebook’s crawler. The robots.txt file is a standard used by websites to communicate with web crawlers and other web robots. Make sure that there are no specific rules blocking Facebook’s crawler (facebookexternalhit). simply put following codes on robots.txt :
User-agent: facebookexternalhit Disallow:
User-Agent Whitelisting: If you have any security plugins, firewalls, or server configurations that restrict access based on user-agent strings, make sure that Facebook’s user-agent string (facebookexternalhit) is whitelisted and allowed to access your website.
HTTP Headers: Make sure your server is returning proper HTTP headers to allow access. Check if there are any specific headers denying access to Facebook’s crawler. Also add facebook pages to your website header. Adding FB pages to your website header is simple. Simply put the following URL on your header files with your page id.
| <meta property=”fb:pages” content=”your page id here“/> |
Shortener the URL : Shorten the URL using tools like Short URL. Debug the shortened URL, and then debug your main URL. Afterward, Facebook will read your URL. Avoid sharing short URLs on the Facebook platform, as Facebook may interpret them as spam and consequently ban your URL.
After performing above steps facebook will reads our URL after few hours (12 to 48).
Also Read
© 2023 All right reserved to sobiztrend.com
Leave a Reply