New blog won't onebox

Since moving our Medium blog to our own subdomain, we are consistently having this error every time we share a blog post on our forum.

I have validated the links with OpenGraph, and they seem to work fine.


screenshot from

(p.s talljeff says hi to jeff a!)


Something about your setup is weird.

If I issue a GET to this URL I get a sequence of redirects:

GET → 307 → 302 → 200

However, if I issue a HEAD I get a 200 straight away

HEAD → 200

The way our onebox works is that we try to handle all the redirection dance with a HEAD request first, and pass the already resolved URL and the necessary cookies to the oneboxer engine.

Since your setup is doing different responses for each, this breaks onebox. It’s also quite bad for perfomance when the canonical URL for the article is always two redirects away from rendering, so you may want to fix that.


Thanks Rafael,

All we did (as far as I’m aware) was use Medium’s new custom domain implementation and created the relevant A Name records.

Would this therefore be an issue to raise with Medium? I’ve asked our Head of Infrastructure in case it’s something with how our domain is set up.


Maybe contact Medium support about it?


hi @Falco - i have heard back from Medium support, and this is what they have asked.

Could you tell us what User-Agent header Onebox is sending? We can skip that redirects for requests from bots/scrapers that we can identify.

Could you please let me know how best to respond :pray:

1 Like

Whoa! I missed this! Send him a hug :hugs:

We can also repro with this medium entry which also generates a 500.


@eviltrout hope it’s OK to tag you as I see you worked on this before.

Is this still the correct user agent header that I can send to Medium support?

1 Like

@simonb the failure to onebox was tracked to a bug handling the 307 response here:

This PR will fix it when merged:


That’s fantastic news. Thank you so much! :purple_heart:


The Onebox fixes have been merged in and deployed. You should be good to go now!


Amazing! Thank you so much. Looks like I’ve got a few posts to go back and edit tomorrow :relaxed: