buddingromance
buddingromance

Reputation: 11

Discord isn't displaying my website's embed

I've been creating my website for over 18 months now, but suddenly around 5 or 6 months ago Discord decided to just stop displaying my website's embeds.

I tried looking up every possible solution, but I couldn't find anything that would help me. I even tried copying tags from other websites to see if they work, but they don't.

I am literally going insane and pulling my hair out because of this. Here are my meta tags (even tho they shouldn't matter):

<meta property="og:image" content="https://fifty.website/img/logo.png"> 
<meta name="theme-color" content="#fcbdf4"> 
<meta name="twitter:description" content="Website made for a Realm of the Mad God guild - 50. Here you can find useful tools, interactive guild Apply Form and some more info about our members."> 
<meta property="og:description" content="Website made for a Realm of the Mad God guild - 50. Here you can find useful tools, interactive guild Apply Form and some more info about our members.">
<meta property="og:site_name" content="fifty.website ~ by buddingromance"> 
<meta name="twitter:site" content="fifty.website ~ by buddingromance">
<link type="application/json+oembed" href="https://fifty.website/emLogin.json">
<meta content="https://fifty.website/" property="og:url" />

I emailed their support and they replied saying:

Generally, when users can not see embeds in Discord for sites, it usually boils down to the following:

  • The server is blocking Discord
  • Discord has been captcha'd because the server thinks we're a bot (which we are)
  • Discord has been IP blocked
  • Discord sends a slightly weird request by specifying content length (a bug in hyper we've not yet upgraded to fix, https://github.com/hyperium/hyper/commit/fb90d30c02d8f7cdc9a643597d5c4ca7a123f3dd)
  • The page is not returning opengraph metadata (if it's an html page, not a direct image/video link): https://ogp.me/
  • The direct image/video link has content which is too large to embed
  • The server is not using a supported version/cipher for TLS:
  1. My server most likely doesn't block them at all, unless I have to specify that I want to allow them to be able to visit the site with htaccess (which wasn't the case before it broke)
  2. The website IS returning OG metadata
  3. I tested it on an empty html file so there's no way something too large is being returned
  4. My server does support the TLS versions they mentioned.

Is there anything I could do or am I doomed? Maybe I missed something that I could add to my htaccess?

I tried using og tags from other websites to test if they would work, tried changing my .htaccess by either removing it completely, adding "Allow from All", making sure no IP is being manually blocked, tried emailing their support and checked everything they provided as a possible solution.

Upvotes: 1

Views: 6072

Answers (2)

Mike
Mike

Reputation: 607

If you're facing issues with Discord not displaying embeds from your website and you're sure that your OG tags are set correctly, the problem may not be with Discord but rather with your hosting provider's ModSecurity settings.

I faced a similar problem where Discord embeds suddenly stopped working. After extensive research and discussion with my hosting provider, we discovered that ModSecurity, a web application firewall, was blocking Discord's crawler, mistaking it for a malicious bot due to rule ID 99011.

Here's the solution that worked for me:

  1. Request that your hosting provider tails your domain's Apache logs as you share your website link on Discord.
  2. If ModSecurity is blocking access, note the rule ID indicated in the error message, like [id "99011"] in my situation.
  3. Ask your hosting provider to whitelist the identified ModSecurity rule (for example, 99011) for your entire account or specific domains, whichever is applicable.

My hosting provider was able to allow this specific ModSecurity rule for my entire account, and now the embeds are displaying correctly without compromising security.

ModSecurity is crucial for protecting your website, so ensure you're not disabling essential security features.

Upvotes: 0

buddingromance
buddingromance

Reputation: 11

It literally fixed itself randomly... For anyone struggling with the same issue coming here in the future - just pray that it gets fixed on its own or let their support team about your issue. It's possible that the recent Cloudflare bug they had caused this.

Upvotes: 0

Related Questions