Og/twitter previews not working

Hey @Luke! The URL does not work in the card validator (that is precisely the problem).

Here is the URL: https://detailspro.app/community/design/6262AB10-8339-4888-86B8-8D73B7D54A73

It you check it out, the meta tags should all be there and they come up properly on other meta tag testing suites.

So, basically, I’m just trying to highlight that these do not work on twitter’s validator, and this is a growing concern for staying with netlify on this site and other media-heavy, social-share-heavy sites I’ve been deploying on this platform

Hi, @sfunfocus. The prerendering service is not enabled for that site:

https://app.netlify.com/sites/<site subdomain here>/settings/deploys#prerendering

So, if this site requires prerendering to create the required OG tags, that is the first issue. However, I don’t know if your sites requires prerendering or not.

Note, the URL you sent is a 301 redirect to this new URL:

https://detailspro.app/community/design/6262ab10-8339-4888-86b8-8d73b7d54a73/

However, even that new URL doesn’t render in the Twitter card validator.

This site doesn’t use prerendering, post processing, or asset optimization. This means Netlify is serving the exact files your deploy created unmodified. We are not changing the files.

In other words, it would appear that the HTML itself doesn’t render the card at Twitter. This is being caused the HTML file itself as Netlify isn’t modifying that file in any way.

If those files do not display a card at Twitter you will need to examine the HTML to find out why that is. Does this site require prerendering to show the card?

Hi @luke, thank you so much for your last message. I had not noticed there was a 301 happening, and I did not about prerendering. I turned on prerendering, turned off all asset optimization after reading up the trailing slash/no trailing slash situation that can lead to the 301s, and with no changes to the HTML they are now working!

I suppose I’m not sure if it was the prerendering that did it, or the removal of the 301, but probably the prerendering?

Either way, this has been a great experience and I’m going to set these settings for all the sites I manage. Thank you x1000000

Hi, @sfunfocus. It is great to hear it is working! There are so many “moving pieces” and you were very thorough checking all the related settings.

Thanks for letting us know it is resolved and if there are other questions, please create new topics or posts anytime! :slight_smile:

I just want to let everyone know that I eventually gave up and moved over to using Cloudflare for dns-handling (and proper handling of redirect) and OG has been working flawlessly.

1 Like