Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To embed the YouTube API video player without related videos appearing at the end, you need to add the parameter “rel=0” to the end of the embed code. This will disable the related videos from appearing at the end of your video. Here’s an example of the modified embed code:

<iframe width="560" height="315" src="https://www.youtube.com/embed/XXXXXXXXX?rel=0" frameborder="0" allowfullscreen></iframe>

Replace “XXXXXXXXX” with the ID of the YouTube video you want to embed.

Note: Keep in mind that if the video owner has allowed their video to be embedded, they still have control over whether related videos will show up on their video or not. If they have disabled this feature within their YouTube settings, your “rel=0” parameter won’t make a difference.