How to stop YouTube showing related videos

If you don’t want YouTube to suggest and show related videos at the end of your embedded video, we can add this parameter rel=0 at the end of the URL.

<iframe width="720" height="405" src="https://www.youtube.com/embed/o1sML93K5M4?si=ls-lKs7yCb3rHsJM&rel=0"
        title="YouTube video player"
        allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
        referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

That’s it! See the demo.

I got the idea from reading this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.