Trouble with opengraph (and www)

Website URL

selliotp.com

I’ve been trying to get the open graph properties to display the image and text desired for my website. Old descriptions (from when I used the domain on tumblr) and placeholder.png (angry birds) are showing up instead. And when I try to check it with facebook sharing debugger, openGraph.xyz or ahrefs, I get error messages:

facebook sharing debugger: URL returned a bad HTTP response code.

opengraph.xyz: ERROR fetch failed

app.ahrefs.com:

After looking up several guides, I’m still having trouble getting this working. In fact, it looks like, while doing so, I’ve broken the www version of my site (‘www.selliotp.com redirected you too many times’). Here’s what I’ve done:

Got an SSL certificate- requested and installed from the InfinityFree dashboard (do I need to get one from CloudFlare?)

CloudFlare- Some posts in this forum seemed to suggest that CloudFlare is needed for openGraph stuff to work, so I followed this guide to run my dns management through CloudFlare. These domains all have a proxy status of ‘proxied’ except for the MX one which is DNS only:
image

You can see this in my page’s html, but here are the relevant elements in my html head:

    <link href="slider.css" rel="stylesheet">
    <link rel=“canonical” href=“https://selliotp.com” />
    <title>stephan e perez : performance and new media</title>
    <meta property="og:title" content="stephan e perez - artist" />
    <meta property="og:url" content="https://selliotp.com" />
    <meta property="og:type" content="website" />
    <meta property="og:description" content="performance and new media" />
    <meta property="og:image" content="https://selliotp.com/archives/images/lettertomom/lores/00.jpg" />

Here’s my .htaccess file. N.b. this is in my htdocs folder, not the IF default one:

## Falg for GoDaddy
Options +MultiViews

## php_value display_errors On

## Remove extensions
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

## Redirect from extensions to non-extensions
RewriteCond %{THE_REQUEST} \s/+(.+?).php[\s?] [NC]
RewriteRule ^ /%1 [R=301,NE,L]

## Get rid of ?i=1
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)i=[^&]+(.*)$ [NC]
RewriteRule ^(.*)$ /$1?%1%2 [R=301,L]

##
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

There are so many aspects to this that I’m sure I’ve made a mistake in at least one of these places… but not sure how to continue.

Please read this thread

6 Likes

OK, the reason www stopped working was because I needed to set cloudflare’s encryption mode to Full or Full(Strict).

I’ve read the thread you linked (though I confess I skimmed over the Google Search Central article). The OpenGraph previews look fine there and I have them in my html code (I tried them in the order shown by the screenshot in that thread also) :

selliotp.com | OpenGraph - Preview Images and Generate Open Graph Meta Tags

but on the facebook sharing debugger I’m still getting response code 418, which is apparently an April Fools code???

Sharing Debugger - Meta for Developers (facebook.com)

and yeah, still getting angry birds pic and old description on FB. I’ve tried purging cloudflare’s cache multiple times too.

I’m no longer getting the connection timed out error when checking the jpg url on httpstatus.io.

EDIT: I’ve followed the method here and set rules in CloudFlare, but this doesn’t fix it.

This is maybe a somewhat common issue, based on this thread…

Screenshot 2024-04-04 160735

4 Likes

Oof, this is embarassing. I swear it was broken all day. Then I went and got dinner, came back, saw your message, tested it myself and it’s working… and now I don’t know which of any of the things I did fixed it or if it was just a matter of time…

2 Likes

I saw on FB that it was last tried 52 minutes ago from my test so no need to apologize because I believe you - it all takes time and sometimes patience

6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.