facebook share link returning 404 redirect error when page exists

27,180

Solution 1

It looks like facebook managed to scrape the pages when there was a redirect error and hadn't taken a new look since then. When I add the pages to the delinter at developers.facebook.com/tools/debug it views the page fine, by rescraping it -- after which the links being shared work as well!

Solution 2

its simple

add the below meta code in Edit html place in blogger before <b:skin><![CDATA[/*

change the content what you want to be

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

past the link of blog there and scrap it

<meta content='TestedCodes' property='og:title'/> <meta content='Introducing Important basic codes which a programmer needs to know ' property='og:description'/> <meta content='http://www.testedcodes.net' property='og:url'/> <meta content='https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSN90lduXisEbSyVbU4SHa-vcRjQeSZZH7d8kY7AkX3L-f56dFhFw' property='og:image'/>

Solution 3

You should use the debugger provided by Facebook at https://developers.facebook.com/tools/debug/

There, please make sure that your original URL (Fetched URL) and the canonical URL match !!!

For whatever reason, if you end up setting up the wrong og:url entry, it distorts the canonical URL, which does not match the Fetched URL and this is a problem for Facebook. Just make sure that the og:url (canonical URL) entry matches with the actual URL, and hence its not perceived as a redirection

Share:
27,180
Anne-marie Mumford
Author by

Anne-marie Mumford

Updated on September 05, 2020

Comments

  • Anne-marie Mumford
    Anne-marie Mumford over 3 years

    Sharing the following link in facebook is returning 404 error page information instead of the page details and link even though the page exists:

    http://www.kentbusinessangel.co.uk/lucky-achieve-goals?sq=be-excited&src=fb

    To try and fix the error:

    • I tried encoding the link to enable passing the & and ? correctly (didn't work)
    • I created a redirect from http://www.kentbusinessangel.co.uk/lucky-achieve-goals-be-excited/src-fb to the original url (which works when you use the url in the browser, but still only shows 404 error when sharing on facebook)
    • I created a static page at http://www.kentbusinessangel.co.uk/lucky-achieve-goal/fb/be-excited (again this page works in the browser but facebook says error 404 for this page too!)
    • I waited a day hoping that maybe facebook needed time to scrape the page again (he same problem continues)
    • I added metatags to the new static page and made the canonical match the url for this page just in case it would help (but it still shows 404 redirect error sharing on facebook):
    <meta property="og:title" content="13 Lucky Steps to Achieve Your Goals - Be Excited">
    <meta property="og:description" content="Get 13 lucky steps to achieve your goals! - Be Excited">
    <meta property="og:image" content="../../images/numbers/circles/one.png">
    <link rel="canonical" href="http://www.kentbusinessangel.co.uk/lucky-achieve-goal/fb/be-excited">
    

    Does anyone have a clue why the facebook share information is being taken from my 404 error page instead of the url being shared and how I can fix it?

    Edit: After posting this question the original link http://www.kentbusinessangel.co.uk/lucky-achieve-goals?sq=be-excited&src=fb worked on the facebook share! --- However, the other pages that are all set up through the same dynamic page are still not working and neither are the other work around links that I created in the steps above

    i.e. http://www.kentbusinessangel.co.uk/lucky-achieve-goals?sq=effort&src=fb

    Edit2: Would have been nice if posting the second link on here would have magically made that work through the facebook share too - but no joy - *confused*

    Any help on this would be appreciated

    Edit 3: Ok, the original link is back to not working on the share area as well as the other links - so back to square one -

    Fix!! Seems that facebook scraped the pages when there was a redirect error and since then hadn't rescraped them.
    Putting them into the delinter: developers.facebook.com/tools/debug rescraped the page and retrieved the correct information! After doing this new share links for these pages worked too! (so simple :s )

  • DRosenfeld
    DRosenfeld over 8 years
    It's important to enter the canonical link (shown in the og:url meta tag above) into the Facebook debugger to get it to properly scrape the desired page - not a non-canonical alias of the same page, or the page with extraneous URL parameters. Also, the first time you run the debugger, it will still return the 404 error. You need to additionally select the "Fetch new scrape information" button to bring Facebook up to speed.
  • Neo
    Neo almost 6 years
    There was a double entry in the url like example.com/https://www.example.com in the developers.facebook.com/tools/debug page. From FB, it was spread into other browsers and stayed in the cache. After more than three days of painful attempts, this answer gave the idea. I added <link rel="canonical" href="example.com/"> to the index.php of my site, and FB recognizes it well now.