# Embedding YouTube without recommended videos at the end?

**URL:** https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638
**Category:** Support
**Tags:** embedding
**Created:** [8월 28, 2015, 10:10오전 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638 "2015-08-28T10:10:31Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![vin\_ef](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@vin\_ef](https://meta.discourse.org/u/vin_ef)
#### Post date: [8월 28, 2015, 10:10오전 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/1 "2015-08-28T10:10:31Z")

</div>

Hi,  
I have a specific question regarding YouTube videos that I haven’t so far seen answered in any posts on this forum.

We use the Onebox feature to embed YouTube instructional videos into our posts on Discourse so that our users can see how to use our products. The only problem with this is that at the end of the video, YouTube will show links to recommended videos, which are often inappropriate for our audience or promotional videos for competitors. We’d like to use embed codes from YouTube to disable recommendations (and video titles and player actions), but I haven’t been able to find a way of getting the embed links from YouTube to display an embedded video in our posts.

What am I doing wrong here? Is the functionality I’m looking for something that exists in Discourse (v1.4.0.beta6 +79)? I tried looking through the Admin setting for embedding but was unable to make it work, even though I added [youtube.com](http://youtube.com) and [www.youtube.com](http://www.youtube.com) to our list of embeddable hosts. Currently, I paste the embed link into a post and it removes the text form the post so that it won’t even display as plain text.

First post on these boards and I have only been using Discourse for two weeks so apologies if this is a silly question!

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [8월 28, 2015, 8:00오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/2 "2015-08-28T20:00:07Z")

</div>

This would need a patch to the Onebox code… I think I can do it.

---

<div class="post-metadata">

### Author: ![vin\_ef](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@vin\_ef](https://meta.discourse.org/u/vin_ef)
#### Post date: [9월 3, 2015, 2:04오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/3 "2015-09-03T14:04:19Z")

</div>

Thanks Kane! That’s very helpful.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [9월 21, 2015, 8:29오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/4 "2015-09-21T20:29:19Z")

</div>

Hmm, I just looked at the embedding documentation and it looks like they have quietly removed the ability to turn off suggested videos at the end? Or I was mistaken & it was never there.

> **[Supported parameters - YouTube Embedded Players and Player Parameters  | ...](https://developers.google.com/youtube/player_parameters#Parameters)**
>
> YouTube players can be embedded using either an \<iframe\> tag or the IFrame Player API, with a minimum size requirement of 200px by 200px.

---

<div class="post-metadata">

### Author: ![vin\_ef](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@vin\_ef](https://meta.discourse.org/u/vin_ef)
#### Post date: [9월 24, 2015, 12:44오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/5 "2015-09-24T12:44:12Z")

</div>

Seems like it’s still there in the YouTube UI

 ![](https://global.discourse-cdn.com/meta/original/3X/1/0/10f4d036c2f4d6db211d965a67197a3f84befa3d.png)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [9월 24, 2015, 2:33오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/6 "2015-09-24T14:33:09Z")

</div>

the `rel=0` parameter is what you want

---

<div class="post-metadata">

### Author: ![AlChuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alchuck/32/116449_2.png) [@AlChuck](https://meta.discourse.org/u/AlChuck)
#### Post date: [2월 5, 2016, 10:10오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/7 "2016-02-05T22:10:18Z")

</div>

Hmmm… I just tried appending the URL with ?rel=0, and I still see related videos displayed at the end.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2월 6, 2016, 7:16오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/8 "2016-02-06T19:16:55Z")

</div>

It seems like it can be made to work. Here’s a YouTube video about it: [https://www.youtube.com/watch?v=5ZXVd\_Rjm\_s](https://www.youtube.com/watch?v=5ZXVd_Rjm_s)

For this to work with the YouTube onebox it needs add `rel=0` to the embed params. Just adding `?rel=0` to the URL doesn’t work.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2월 6, 2016, 7:23오후 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/9 "2016-02-06T19:23:57Z")

</div>

Yeah, a patch to the onebox code is needed to pass the `rel=0` all the way through.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [12월 16, 2018, 9:38오전 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/10 "2018-12-16T09:38:37Z")

</div>



---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [12월 25, 2018, 1:30오전 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/11 "2018-12-25T01:30:49Z")

</div>

> [@Passing through rel=0 on YouTube embeddings](https://meta.discourse.org/t/passing-through-rel-0-on-youtube-embeddings/62334/6):
>
> Added support for rel=0 via: [https://github.com/discourse/onebox/commit/734c5eef1e370e39f9624da8bb1534d114f4cdf6](https://github.com/discourse/onebox/commit/734c5eef1e370e39f9624da8bb1534d114f4cdf6) Note that YouTube changed the behaviour for [rel parameter](https://developers.google.com/youtube/player_parameters#rel) since September 25, 2018: After the change, you will not be able to disable related videos. Instead, if the rel parameter is set to 0 , related videos will come from the same channel as the video that was just played.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [12월 25, 2018, 1:33오전 UTC](https://meta.discourse.org/t/embedding-youtube-without-recommended-videos-at-the-end/32638/12 "2018-12-25T01:33:33Z")

</div>


