Error 404 when sharing on Facebook

This issue has been posted and resolved a lot, but for some reason, I still can’t share my new posts (using WordPress) to Facebook, either directly on Facebook or using the Share plugin (by Jetpack) on my post. In both situations, it returns in a 404 not found. (with no image, no excerpt, but when clicked it redirects correctly on my post).
It worked fine few days ago.

I’ve made researches for few days now before asking here, and all the solutions I see didn’t work for me.
I tried to use the Facebook link Debugger, a Facebook Like Fix plugin (that apparently worked for someone), debugging the link with www., adding some codes I found in articles about that etc.

Read More

I’ve been redirected to this post frequently (http://www.passwordincorrect.com/issue-with-sharing-wordpress-posts-to-facebook/)
After thinking a lot what could causes this issue without finding it, I even thought if it could be possible (since my posts aren’t scheduled) that this happened after I changed my time zone on Windows and, WordPress would think I posted it “earlier”?

So I finally thought it had something to do with metas, unfortunately this is still kind of a mystery for me, and since that I think my header isn’t properly written.

Here is what I got when using the Facebook Debugger on a particular post that I can’t share :

Critical Errors That Must Be Fixed
Bad Response Code   URL returned a bad HTTP response code.
Warning

Errors That Must Be Fixed
Missing Required Property   The 'og:type' property is required, but not present.

Notice
Warnings That Should Be Fixed
Inferred Property   The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property   The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property   The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.

The Debugger works fine on the website itself though.

I really hope you guys could give me some advices on how to make it work. If any other details are needed, I’ll be glad to add them in my post.


POST EDIT :

So I kept looking to find where my issue comes from.
For some reasons now, I can’t even re-scrape informations (using FB URL debugger) for my “website.com” and my olders posts “website.com/post-that-used-to-work”, even though I can see the already existing scrape informations. (unlike the recents posts, where I can’t see neither existing scrape or new scrape)

According to : https://developers.facebook.com/docs/sharing/best-practices, I added all the needed metas “og:” in my header, didn’t work.

It seemed like something was already calling it, so I then installed the NGFB plugin that told me there were issues with Yoast SEO and Photon (by Jetpack).
I desactivated both of them, it didn’t work.

I still got these errors when trying to debugg a link on a post when tryng to re-scrape informations :

Error parsing input URL, no data was cached, or no data was scraped.

On the website itself when re-scrape :

Object at URL 'http://website.fr/' of type 'website' is invalid because a required property 'og:title' of type 'string' was not provided.

When showing existing scrape informations of a non-working post :

Critical Errors That Must Be Fixed
Bad Response Code   URL returned a bad HTTP response code.

Errors That Must Be Fixed
Missing Required Property   The 'og:type' property is required, but not present.

Warnings That Should Be Fixed
Inferred Property   The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property   The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property   The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.

When clicking on See exactly what our scraper sees for your URL :

Non-working post :

Document returned no data

The website itself :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="Refresh" content="0;url=defaultsite">
<!-- FR -->
</head>
<body>
</body>
</html>

And finally my current head part :

<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="
<?php bloginfo('html_type'); ?>;
charset=<?php bloginfo('charset'); ?>" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="description" content="Description (changed)"/>
<meta name="author" content="Author (changed)"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta property="og:title" content="Title (changed)" />
 <meta property="og:site_name" content="Site name (changed)"/>
<meta property="og:description" content="Description (changed)" />
<meta property="og:url" content="http://website.fr" />



<link rel="shortcut icon" href="<?php echo THEME_DIR; ?>/favicon.ico" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS2 Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />


<title><?php wp_title(); ?> - <?php bloginfo( 'name' ); ?></title>

<?php wp_head(); ?>

</head>

Everything works fine for Google+ and Twitter though.
I really hope someone could help me with my issue.

Related posts

3 comments

  1. I know this is an old post but it took me a while to figure this out:

    https://developers.facebook.com/tools/debug/og/object/

    Under When and how we last scraped the URL: check the IP address.

    I found it to be an IPV6 address, but my website runs only on IPV4.

    The IPV6 address went to the server’s default page site, which generated the 404 error, because the URL didn’t give a result.

  2. I had the same problem when i public my WordPress post on Facebook.
    Then i saw the Henry answer, and he said that the IPV6 was the problem, but the real problem is the multiple IP4 and IP6 on the DNS configuration.

    I Go to my Cpanel or whatever u used to manage ur server, I deleted all the IPV4 and IPV6 that are not important for the domain.

    For example, the IPV6 AAAA WWW.
    The A a.
    another A a, A ide.

    Ones the DNS are deleted, i got to: https://developers.facebook.com/tools/debug and ran the test, finally all looks good, the preview worked include the meta tags.

    This solved my problem on my domain.

Comments are closed.