Solve “Youtube refuse to connect” while using youtube link in iframe code

Sometimes, when we use the youtube link directly in iframe code, the video will not load and shows error like youtube refuse to connect.

<iframe width="420" height="345" src="https://www.youtube.com/watch?v=97zGmkdhSNU">
</iframe>

Solution:

YouTube doesn’t allow 3rd parties to embed their site directly like that.

The easiest way to get the correct link is to right-click on the YouTube video and select copy embed code.

Leave a comment

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