How to Resolved a Facebook – URL returned a bad HTTP response code

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.

What Actually means Facebook – URL returned 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 :

  1. Permissions: The URL might be restricted by access permissions set on the server or by specific configurations.
  2. IP Blocking: The IP address from which Facebook is accessing the URL might be blocked by the server.
  3. User-Agent Blocking: Some servers block access based on the user-agent string, which identifies the software making the request. Facebook’s crawler has its own user-agent string, and if the server is configured to block it, Facebook won’t be able to access the URL.
  4. Firewall or Security Plugins: The server might be protected by a firewall or security plugins that are configured to block access to certain requests.

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:pagescontent=”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

How to Correctly Set Up a Robots.txt File for Your Website

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Need Help ? Call Our award-winning support team 24/7 at 01-4983900

© 2023 All right reserved to sobiztrend.com