Sites being redirected to

I have a weird issue.

I’ve made my whole site, published it to an EC2 instance.
Everything works. You can see all the code on dans GitHub project.

When I post to Mastodon (via official Mac app) or LinkedIn I get a strange bug.
I type in
When I click the link in those posts, it works fine.
When I click the generated previews on those site I get sent to

Two completely different sites. So I’m wondering if there’s something I need to change or if this should be reported to those sites.

Possibly the issue: the URL /posts/automation gets redirected to add the trailing slash, but it redirects via the insecure HTTP site. I imagine that might confuse link preview generators:

% curl -IL

HTTP/2 301 

HTTP/1.1 301 Moved Permanently

HTTP/2 200