# Sites being redirected to site.com/posts/post-name/site.com/posts/post-name

**URL:** https://talk.jekyllrb.com/t/sites-being-redirected-to-site-com-posts-post-name-site-com-posts-post-name/8077
**Category:** Help
**Created:** [March 6, 2023, 6:40pm UTC](https://talk.jekyllrb.com/t/sites-being-redirected-to-site-com-posts-post-name-site-com-posts-post-name/8077 "2023-03-06T18:40:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![oconnordaniel](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/oconnordaniel/32/5147_2.png) [@oconnordaniel](https://talk.jekyllrb.com/u/oconnordaniel)
#### Post date: [March 6, 2023, 6:40pm UTC](https://talk.jekyllrb.com/t/sites-being-redirected-to-site-com-posts-post-name-site-com-posts-post-name/8077/1 "2023-03-06T18:40:50Z")

</div>

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](https://github.com/oconnordaniel/dans-homepage.git).

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

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.

---

<div class="post-metadata">

### Author: ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)
#### Post date: [March 6, 2023, 9:56pm UTC](https://talk.jekyllrb.com/t/sites-being-redirected-to-site-com-posts-post-name-site-com-posts-post-name/8077/2 "2023-03-06T21:56:34Z")

</div>

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:

```auto
% curl -IL https://oconnordaniel.com/posts/automation

HTTP/2 301 
location: http://oconnordaniel.com/posts/automation/

HTTP/1.1 301 Moved Permanently
Location: https://oconnordaniel.com/posts/automation/

HTTP/2 200 

```
