Disable related videos on a embedded Youtube player

Last updated on Sun, 2010-06-06 09:59. Originally submitted by fabio on 2007-08-23 12:19.

Youtube recently added a new feature to the video player used to embed Youtube videos on other website.

The new default player, once the video completes playing, will display a list of related videos.

While this feature could be useful for some users it is probably not wanted on Youtube video aggregation websites.

Fortunately it's possible to disable related videos.
Let's see how.

The default player

Let's take a cool video (I'm a windsurfing addicted).

The default embed code Youtube suggest us is

<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/Yc_J_kXaFSw"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/Yc_J_kXaFSw" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>

Which will generate this:

As you can see, at the end of the video the player will display something like this:

Youtube related videosYoutube related videos

Disabling related videos

The trick is to attach to the player URL (http://www.youtube.com/v/Yc_J_kXaFSw) the rel=0 parameter.

The player URL will became http://www.youtube.com/v/Yc_J_kXaFSw&rel=0

Just update the embed code with the new URL:

<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>

The player now looks like:

We don't have more related videos!

Let's use valid XHTML code

Unfortunately the embed code provided by Youtube isn't valid XHTML code and does not pass the W3C's XHTML validation.

This is really bad as creating valid XHTML web pages is valuable and professional. In some countries it is even required by law for public administration websites.

So we can use something like

<!--[if !IE]> <-->
<object type="application/x-shockwave-flash" width="425" height="350"
<!--> <![endif]-->
<!--[if IE]>
<object type="application/x-shockwave-flash" width="425" height="350"
<param name="movie" value="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0" />
<p>Your browser is not able to display this multimedia content.</p>

The above code, which come from my Drupal video module, is valid XHTML code and works with the most used web browsers.

The above code generate:

Your browser is not able to display this multimedia content.


You are now able to control the behavior of Youtube player related video and post on your website Youtube videos following XHTML standards.


New! Related Videos Appearing on Embeds at Youtube Blog

Posted in:

Tahukah bahwa rasa pedas

Submitted by Minah (not verified) on Sat, 2015-09-05 01:52.

Tahukah bahwa rasa pedas mampu meningkatkan nafsu makan pada ibu hamil? Ketika ibu hamil sedang dalam masa 3 bulan pertama atau trimester pertama, mereka akan sering mengalami rasa mual dan muntah, atau disebut dengan gejala morning sickness. Makanan Pedas Untuk Ibu Hamil Bolehkah?

Obat Herbal Miom Tanpa Operasi

Submitted by Jelly Gamat Gold-G (not verified) on Fri, 2015-09-04 02:55.

Terimakasih banyak atas artikel yang anda posting ini, sangat menarik dan juga bermanfaat bagi saya. Tetap semangat menulis artikel-artikel lainnya yang lebih menarik dan bermanfaat ya ..
Obat Herbal Miom Tanpa Operasi

thanks you so much for today,

Submitted by simalumun (not verified) on Thu, 2015-09-03 07:26.

thanks you so much for today, thanks guys. i hope today is the same with my plan.
cara mengobati asam lambung naik ke tenggorokan

thanks you so much for today,

Submitted by simalumun (not verified) on Wed, 2015-09-02 08:44.

thanks you so much for today, thanks guys. i hope today is the same with my plan. Hepatsure Capsule Obat Untuk Penyakit Liver

thanks you so much for today,

Submitted by soldalo (not verified) on Wed, 2015-09-02 04:44.

thanks you so much for today, thanks guys. i hope today is the same with my plan. Obat Untuk Gejala Tipes Pada Anak

All artwork is copyright Bill

Submitted by tong give aup (not verified) on Tue, 2015-09-01 05:21.

All artwork is copyright Bill Pulkovski and cannot be used without permission. Hepatsure Capsule Obat Untuk Penyakit Liver

Salah satu penyebab yang

Submitted by Solehu (not verified) on Mon, 2015-08-31 08:42.

Salah satu penyebab yang dapat menimbulkan nyeri sendi yaitu penyakit yang dapat merusakan persendian serta cedera. Penderita dapat mengalami rasa nyeri yang amat hebat ketika mengalami peradangan sendi. cara mengobati tipes secara alami

some of the articles on this

Submitted by Anonymous (not verified) on Fri, 2015-08-28 07:49.

some of the articles on this blog very helpful at all of my friends in work on a book. Thank you. ketahui penyebab sering bersendawa

Even with snowshoeing,

Submitted by sohay (not verified) on Thu, 2015-08-27 10:16.

Even with snowshoeing, getting out walking again and the occasional trip to the woods to scrounge wood for fairy houses, Beberapa Hal Untuk Menjaga Kesehatan Hati

Cara Menyembuhkan Diare

Submitted by bratyeh (not verified) on Thu, 2015-08-27 05:39.

Cara Menyembuhkan Diare Dengan Teripang Cara Menyembuhkan Diare Dengan Teripang

Thank you

Submitted by Mahesh (not verified) on Thu, 2014-03-20 12:42.

It worked


Submitted by Anonymous (not verified) on Sat, 2013-09-14 06:17.

the easiest way to delete unrelated videos (posted sept 2013) is
to 'ADD' ... something to the end of your 'real video'

I just add about one minute of SOLID BLACK.jpg

the view will get bored after a few seconds and close the video!


Submitted by Caryn (not verified) on Tue, 2013-03-05 18:56.

Thanks for your easy and simple instructions. Got mine fixed in just a few minutes!

It should say ?rel=0 and not

Submitted by Chai (not verified) on Fri, 2013-02-15 19:53.

It should say ?rel=0 and not &rel=0

If it's embed code, then

Submitted by Anonymous (not verified) on Fri, 2014-09-12 17:31.

If it's embed code, then ?rel=0 will work fine. But each link of this type can only have one ? (new term), and if you add ?rel=0 to a regular share link, it will have two ? terms and will not work. The &rel=0 is correct for regular share links.

Thank you!

Submitted by Tara (not verified) on Fri, 2012-06-15 01:07.

I had read the &rel=0 on another site but didn't know where to insert. On the video I was uploading, the script actually looked like:


and I ended up deleteing "version=3&feature=player_detailpage" and then putting in &rel=0 before it would work. The video seems to run fine.


Thank you!

Submitted by Lauren Thomas (not verified) on Tue, 2012-01-24 12:32.

I sure do appreciate all you smart people taking the time to set up these types of forums!

If you want to do this

Submitted by Dave (not verified) on Sat, 2011-11-12 00:54.

If you want to do this automatically, you can use the Youtube embed tool here:




Yeah... but not 4 years ago

Submitted by fabio on Sat, 2011-11-12 01:27.

Yeah... but not 4 years ago ;-)


Submitted by Anonymous (not verified) on Mon, 2011-08-22 18:57.

thanks a lot!!


Submitted by Sneaky (not verified) on Tue, 2011-07-19 10:57.

Worked like a charm, thanks for the code(s). Now I got to change all my vids.

admin edit: removed spam looking link. Only links to personal/non profit websites are tolerated.

Yes it is also working well

Submitted by Alan Peterson (not verified) on Tue, 2014-09-16 06:41.

Yes it is also working well for me as i have completed many online programs and document with it and configure them well.
kiwipokies nz

Or use Youtube's own function...

Submitted by Anonymous (not verified) on Fri, 2011-03-04 13:39.

Alternatively you can use Youtube's options under the embed code and untick the one that says 'Include related videos'. :)

Not four years ago.

Submitted by fabio on Fri, 2011-03-04 14:17.

Not four years ago.

Thanks for info Is there a

Submitted by Chris (not verified) on Thu, 2011-02-03 02:36.

Thanks for info

Is there a way once I've embeded a youtube in my wordpress blog..that when poeple click on the youtube video it keeps people on my blog when watching youtube video rather than taking them to the youtuve site to watch the video when they click the video twice?

Really appreciate your speedy reply on this

Talk soon
Chris :)

According to

Submitted by fabio on Thu, 2011-02-03 09:34.

According to http://www.warriorforum.com/main-internet-marketing-discussion-forum/210... you can use:

Put this:
<param name="allowNetworking" value="internal">
before the <embed> tag

Put this:
after size 

Let me know if that worked.

It works!

Submitted by Anonymous (not verified) on Wed, 2011-01-19 09:21.

Yes it WORKS!!! thanks man!

Admin edit:
sorry, spam link removed. Only link to personal or nonprofit websites are tolerated.

nice tutorial of video posting

Submitted by Yeast Infection Home Remedy (not verified) on Mon, 2010-12-27 17:21.

hi, i also looking for the way to stop related video at the end of my site.
thanks so much for providing this awesome script.
happy coming new year

ADMIN EDIT: Sorry, link removed. Only links to personal or non commercial websites are tolerated.

Thank you very much, I

Submitted by MyForces (not verified) on Sat, 2010-12-18 01:47.

Thank you very much, I stumbled upon this completely by accident - I wasn't even looking for articles on how to remove related videos from YouTube player - but this is excellent information and i'll be definitely implementing this on my own websites. Thanks again.

Thanks very much !

Submitted by Esmoke.dk (not verified) on Thu, 2010-12-16 17:25.

Trying to get rid of those darn after videos with no luck, but your embeed code helped right away.

Thanks very much for your help by posting this :o)

Admin edit: Removed link. I'm sorry only links to personal websites are tolerated.

I've been wondering for a

Submitted by Julie Bergsetein (not verified) on Sat, 2010-11-27 12:13.

I've been wondering for a while how to disable that "feature" - I always thought it was against the Youtube TOS or if not simply impossible to stop the related videos at the end. I'm glad I can stop it for my website as it looks far more professional to just end the video immediately and not pop up with some more videos which may or may not be relevant to the video I want to display on my page.

Best Wishes, Julie Bergestein.

ADMIN EDIT: removed links to business website. Only links to personal websites or to related pages are tolerated.


Submitted by Anonymous (not verified) on Fri, 2010-11-26 20:36.

Thanks! The content on this page was very helpful.


Submitted by Raj (not verified) on Wed, 2010-11-17 23:20.


Thanks very much.

Submitted by Anonymous (not verified) on Wed, 2010-11-17 05:08.

Thanks very much.

thanks so much

Submitted by andrew (not verified) on Wed, 2010-11-10 02:51.

thanks thanks thanks.... this site is very helpful.... keep it up gurus!

Show video without paying $70, nice!

Submitted by Barry L Salter (not verified) on Fri, 2010-11-05 07:11.

Last web site I set up video on we purchased a codac for $70 and it was complicated to set up... This took 5 minutes (faster if it had been a site I was working on) and worked... can't say thank you enough!

Thank You

Submitted by Jason Wynne (not verified) on Fri, 2010-10-29 15:27.

Just wanted to add thx for this - it is people like you that share information and make developers lives much easier. on a related note, all joomla users note that this works in joomla also.

"I am what I am because of

Submitted by fabio on Fri, 2010-10-29 18:19.

"I am what I am because of who we all are."

And I would add: If I improve and then share, we all improve.

thanks so much for this also

Submitted by raheel (not verified) on Thu, 2010-09-30 00:04.

thanks so much for this also i wanted to know about how i disable clicking on youtube, dailymotion and other service plyaer

Admin edit: removed spam looking link.


Submitted by Manisha Sherla (not verified) on Fri, 2010-07-30 10:31.

thanku for this article....

Thank you very much for your

Submitted by Malid (not verified) on Thu, 2010-07-01 01:36.

Thank you very much for your post.


Submitted by Soko Banja Apartmani (not verified) on Wed, 2010-06-30 00:36.

this is great, thanks

disabling related videos

Submitted by Tom (not verified) on Sun, 2010-06-06 01:41.

Excellent. Many thanks for that, extremely irritating YouTube feature disabled on my blog.

Banja Vrujci Video

Submitted by Banja Vrujci (not verified) on Sun, 2010-05-23 18:44.

Thank you for this very useful tip, i dont like these "related videos" at all. Also i have some clips from youtube on my site http://www.banjavrujci.info/smestaj/video and i am going to put your code to disable related videos. Thank you once again

Great blog - Awesome!

Submitted by Brent Lane (not verified) on Thu, 2010-04-29 00:09.

Hey thanks for making that quick and easy tutorial blog. I really rely on things like this for my learning curve. I did just made the changes to my video at http://www.brentlane.com it's right no the front page. We used green screen actually ($.50 poster board scotch taped together) and then did some pretty neat stuff in the video. Check it out if your interested.

Once Again thanks for the blog post. It was clean, concise, and most importantly was the first one I found. I am going to link to this blog post from mine on the site. Cheers.

Tool that does this for you

Submitted by Anonymous (not verified) on Fri, 2010-10-22 02:25.

Here is a tool that does this for you:


Submitted by Soko Banja (not verified) on Wed, 2010-04-21 09:40.

Great tips. Thanx. Very useful

Thank you for the tips!

Submitted by Eaindra (not verified) on Wed, 2010-03-31 10:48.

Thank you for the tips!

Remove embedded youtube video

Submitted by Anonymous (not verified) on Mon, 2010-03-08 04:54.

Can someone tell me how to remove my embedded youtube video from my wordpress front page.

Thanks for the tip

Submitted by Nitin (not verified) on Sat, 2010-02-20 11:12.

Thank you for the excellent tip.

Post new comment

The content of this field is kept private and will not be shown publicly.
If you have a personal or company website insert its address in the form http://www.example.com/ .
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <small> <del> <img> <h2> <h3> <h4> <b> <video> <sub> <sup>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You may insert videos with [video:URL]
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options