So, the other day I was asked to embed a YouTube video for a client. Ok, easy enough, I have done it plenty of times and knew just what to do. However, something had changed in YouTube’s “Share>Embed” options. Primarily the checkbox for “Show Related Videos” was now missing.
Ok, no problem. I understand that you just add “?rel=0” to the end of the embed code URL and that will do the trick. However, after embedding the code, uploading to the server, refreshing my cache, the related videos were still there! I checked all my steps again, making sure I uploaded the correct files, etc. etc. But nothing seemed to fix the problem. Queue hair pulling!
I searched around the web, but I kept getting post after post on the previous methods for “Not Showing YouTube Related Videos”, which now were obviously not working for some reason. So I pestered a fellow developer and he wasn’t aware of any changes to the parameters for “?rel=0” either.
I went back to Google.com and altered my search to “?rel=0 not working youtube”. Ah, ok, here we go, some answers began to materialize.
All right, I’ll cut to the purpose of this post… YouTube/Google has deprecated “?rel=0” for embedding videos and it no longer works as before. This change took place on September 25, 2018. You can read about this on the following page:
https://developers.google.com/youtube/player_parameters (Do a page search for “Rel”)
Here are some key transcripts from the Google’s statements:
Prior to the change, this parameter indicates whether the player should show related videos when playback of the initial video ends.
If the parameter’s value is set to 1, which is the default value, then the player does show related videos.
If the parameter’s value is set to 0, then the player does not show related videos.
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.
Note: This is a deprecation announcement for the showinfo parameter. In addition, the behavior for the rel parameter is changing. Titles, channel information, and related videos are an important part of YouTube’s core user experience, and these changes help to make the YouTube viewing experience consistent across different platforms.
So there you have it. If you have been cursing profusely at your computer for the last hour, trying to figure why those related videos keeps haunting your client’s brand, it’s because Google decided to make a change for internal purposes, NOT because of anything you have or haven’t done to your code.
Frustrating, yes, because Google already set expectations, but at least the related videos are only from the same YouTube channel as the target video. Thanks for that, I suppose.
A few final notes on this:
- I found previously embedded videos to the Sept. 25, 2018 deprecation still honor the original “?rel=0” parameter. Not sure if this is definite, but it appears that way currently
- My developer friend made the comment that he wonders if Google might start charging for complete suppression of related videos in the future, perhaps with an extra set of settings/controls. If so, I guess we are all at their whim, huh.
Now, go forth and embed those videos with confidence! But if you feel like grumbling a bit first, I’m right there with you.
*Update – Suggested Workaround (1-4-2019):
I was emailed the other day by a gentleman (Thanks, Laren!) who was nice enough to share a possible workaround on this topic. I haven’t tried this myself, but it makes sense and could be of some help if you or your client insist on NO related Youtube videos. It goes like this…
Step 1 is create a special channel for videos where you do not want to show any related videos at the end. Any videos you upload to this channel also need to be set to Unlisted. Even though unlisted on youtube they will still play in your embeds on other sites.
Step 2 of course is to include the rel=0. This means show only related videos in the channel of origin. If videos are unlisted then they are ignored, so it is like there are no related videos.
This works but you do have to live with the videos being unlisted on youtube.