How to Add a YouTube Subscribe Widget to your Website
Do you have a video channel on YouTube? Then you may want to add this simple “Subscribe” button to your website that will help visitors subscribe to your YouTube channel with a click without having to leave your site for YouTube.
For example, here’s a “live” subscription button for my video channel on YouTube:
To embed this button to your own website, just copy-paste the following block of HTML code anywhere in your website. Then replace XYX in the subscription URL with your own YouTube username.
<iframe src="http://www.youtube.com/subscribe_widget?p=XYZ" style="overflow: hidden; height: 105px; width: 300px; border: 0;" scrolling="no" frameBorder="0"> </iframe>
Related: YouTube Promotional Banners
When you create a link from the website to your YouTube channel, there’s a probability that that visitor may fail to notice the “subscribe” button on the already crowded YouTube channel page.
However, if you add
sub_confirmation=1 to the YouTube channel link, the visitor will get a prompt to subscribe to your channel while they are on the YouTube website. Click here for a live example.
Please do note that the Subscribe prompt would not be displayed if the visitor is already subscribed to your YouTube channel or if they are not logged into YouTube.
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.