Website & Rumpus Feedbag

Hello,

The levelhead.io and intermediate redirects do not embed like they should. https://levelhead.io/+zwm8fpl --redirects to-> https://www.bscotch.net/games/levelhead/+zwm8fpl --redirects to-> https://www.bscotch.net/games/levelhead/levels/zwm8fpl

The last link in that list embeds (e.g. in Discord), as it should. But neither of the previous two do. When copying links from Levelhead, they are always the levelhead.io redirects. But I would like them to embed, so I manually access them to get the real link when I want to share it. Which seems a bit unnecessary.

Slothybutt

@6kb88h 6/18/2026, 12:47:10 AM #typo

Additional Information

This is an interesting problem. The way that embeds/previews work is that the service you post a link to goes and fetches the HTML for the URL and extracts its metadata to decided if/what to display. Each service can handle this differently, in particular with respect to redirects.

So if Discord doesn't follow redirects I could see why https://levelhead.io/+zwm8fpl doesn't yield a preview (it's a pure redirect -- levelhead.io doesn't exists at all and just redirects to bscotch.net, so there wouldn't be any HTML to extract metadata from).

However, I can't figure out why https://www.bscotch.net/games/levelhead/+zwm8fpl doesn't populate a Discord embed. It doesn't actually redirect until the page loads, and so it directly serves the HTML that has the metadata Discord would be using to create the embed. And if Discord was first following a redirect it'd be getting the same metadata in both cases.

Which is all to say: I'm not sure if I can fix this since I don't know what factors Discord uses to decide to render a preview. In principle a social-preview generator like Discord's should follow server-side redirects and then extract metadata from the last place it lands, which would be https://www.bscotch.net/games/levelhead/+zwm8fpl in the case of https://levelhead.io/+zwm8fpl

Another possibility is that there's some other caching layer or something that Discord hits that my direct requests don't, so I can't actually see what Discord is seeing when it's making those requests.

I'll add it to my ToDos to investigate when I get the chance!

Adam@bscotch404 6/22/2026, 2:49:36 PM

I believe this is SOLVED.

The short story is that the middle layer of the redirect was happening client-side rather than server-side. So the request that actually hit the server was for https://www.bscotch.net/games/levelhead/+zwm8fpl and the returned page triggered a local redirect to the final page in the browser. While that first result should have properly set all that preview data (I still can't identify why it didn't) its only purpose was to redirect anyway.

So basically you'd go to that first URL, get a 301 redirect response to that second URL, get a 200 response from that one and then load a bunch of JavaScript which would eventually end up showing all of the right content (but Discord doesn't run that JavaScript, so it only saw what was on that transient intermediate page).

I've changed that second redirect to happen server-side, so now you'll get 301 -> 301 -> 200, and everything seems to be properly working in that final page.

Adam@bscotch404 8/13/2026, 8:20:01 PM

You must log in to provide feedback.