Issue with Open Graph formatting

#790284
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for reaching out to us regarding the issue you are facing with the Open Graph (OG) formatting on your website. We apologize for any inconvenience this may have caused.

    To address the problem with RankMath’s Open Graph formatting causing issues with Google Pagespeed, we recommend following these steps:

    1. Disable RankMath: As you mentioned, disabling RankMath resolved the issue. You can keep RankMath disabled temporarily to ensure your website performs optimally until a fix is provided.

    2. Contact RankMath Support: Our support team can assist you in resolving this matter. You can reach out to our support team directly by clicking here. Please provide details about the problem you are facing, including the Pagespeed reports and any other relevant information.

    Our team will investigate the problem further and provide you with a solution as soon as possible.

    If you need further assistance or have any additional questions, please feel free to reply to this ticket.

    Thank you for your understanding and cooperation.

    Best regards.

    Sources:
    How to Fix the ‘og: image’ Property Should Be Explicitly Provided » Rank Math
    Open Graph/Social Preview Image Is Not Displayed » Rank Math
    Analyzing Your Site’s SEO with Rank Math’s SEO Analysis Tool

    Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please note that this open graph protocol is required for LinkedIn to share your webpage URLs. It shouldn’t cause any issues on your website.

    In this case, could you please share the exact error you’re getting for this open graph protocol? You can also share a screenshot with us by using a tool like https://imgur.com/upload so that we can check the issue further for you.

    Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    Hi Rakibuzzaman,

    Thank you for your response and your time.

    We’ve encountered an error while using Google Pagespeed. It indicates that a declaration for text encoding is required, which can be accomplished with a <meta> tag within the first 1024 bytes of the HTML or in the HTTP response header for the content type. For more details on defining text encoding, please refer to the link provided.
    https://pagespeed.web.dev/analysis/https-www-gezondperspectiefzwolle-nl/8bq5zd4y1j?form_factor=mobile

    Upon inspecting the source code, I noticed that there’s Open Graph text in the second line of code:

    <!doctype html>
    <html lang="nl-NL" prefix="og: https://ogp.me/ns#">

    This placement of the Open Graph code appears to be causing the issue.

    Interestingly, when I remove this code and rerun the Pagespeed test, the problem is fixed.
    The only difference between the two tests is the absence of the Open Graph code, resulting in the updated code:

    <!doctype html>
    <html lang="nl-NL">

    It seems to me that there’s something wrong with the placement of this Open Graph code.

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Please try applying this code to remove the open graph attribute.

    add_filter( 'language_attributes', function( $input ) {
    	$input = str_replace( ' prefix="og: https://ogp.me/ns#"', '', $input );
    
    	return $input;
    }, 16 );

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes. Looking forward to helping you.

    Anonymous
    Rank Math free

    Hi Jeremy,

    Thanks for you time and the solution.
    I’ve implemented the code, which seems to solve this particular issue.

    Kind regards,
    Jelle

    Hello,

    We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on
    https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post

    about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

The ticket ‘Issue with Open Graph formatting’ is closed to new replies.