Addition: Domain-Level Restriction
Most video servers use the Referer HTTP header to implement domain-level restriction for accessing the domain-protected embedded videos.
This cannot be easily tricked at the client-side, because modern Web browsers disallow changing the Referer HTTP header from a client-side JavaScript fetch (AJAX) calls.
Bypassing by Server-Side Proxy
Beware: the Referer HTTP header-based domain restriction can be bypassed by a server-side script, which requests the video with spoofed HTTP referer and re-streams it to the client (as proxy).
For example, the «domain-level privacy» for Vimeo videos can be bypassed by a server-side code, which fakes the Referer HTTP header and the related cookies in a server-side HTTP request.
Bypassing by Client-Side Code Injection in Allowed Domain
An easy way to watch a domain-level restricted video (when you have its URL) is by client-side injection of the video player code in some allowed HTML page (using the Chrome DevTools).
Let’s see an example. We have a domain-restricted video in Vimeo, which cannot be embedded in the w3schools.com domain (this domain is not allowed by Vimeo):

In the same time, the video owner allows this video to be embedded in the domain softuni.org. We can open https://softuni.org, click [F12] to show Chrome DevTools and inject the video <iframe> code somewhere in the HTML page from this allowed domain:

Now the video plays correctly, overcoming the domain-level access restriction:

Note that this cannot be easily automated by a Web site developer, but can be done by end-users with tech expertise. User’s can also use a browser add-on, which fakes the Referer HTTP header, e.g. see the «Referer Control» add-on fro Chrome.
Видео не доступно в вашей стране или регионе? Тема реально наболевшая и часто обсуждаемая, но есть способы. Расскажу как открыть доступ к видео, недоступное в вашем регионе через VPN.
Это видео недоступно в вашей стране
Что делать если видео не доступно в вашей стране? Есть несколько способов, подробней о них читайте ниже. Лучшим способом открыть доступ к любому ролику и сайту из любой точки планеты — это впн. Способ очень простой, но не всегда бесплатный. Если для вашего региона просмотр недоступен — рекомендуем один из следующих двух впн сервисов. Оба можно попробовать бесплатно, отменив подписку в течение 30 дней.
Если платежи MasterCard и VISA не работают на территории РФ, vpn сервисы предлагают альтернативные варианты платежей. Можно расплатиться криптовалютой (почти все впн провайдеры принимают к оплате Bitcoin, Ethereum и большое количество других криптовалют), электронные кошельки такие как WebMoney, Qiwi или YooMoney (в прошлом Yandex Money) и другие платёжные системы как AliPay, UnionPay и др.
Bitcoin и другие криптовалюты: Surfshark, CyberGhost, AtlasVPN, NordVPN, PIA
WebMoney: Surfshark, CyberGhost, NordVPN, hidemy.name
Qiwi: Surfshark, ExpressVPN, AtlasVPN, NordVPN, hidemy.name
YooMoney: hidemy.name
Apple Pay: Surfshark, CyberGhost, AtlasVPN, NordVPN, PIA. Как пополнить счёт в App Store даже если Mastercard и VISA заблокированы, узнайте здесь
Google Pay: Surfshark, CyberGhost, AtlasVPN, NordVPN
UnionPay: Surfshark, NordVPN, ExpressVPN, hidemy.name, AtlasVPN
Рекомендуемые VPN сервисы для просмотра любого видеоконтента
![]() |
|
9.9 5/5 Stars |
Скачать Бесплатно |
![]() |
|
9.9 4.9/5 Stars |
Перейти на сайт |
![]() |
|
9.9 4,9/5 Stars |
Скачать Бесплатно |
![]() |
|
9.8 4.8/5 Stars |
Перейти на сайт |
![]() |
|
9.8 4.8/5 Stars |
Перейти на сайт |
![]() |
|
9.8 4.8/5 Stars |
Скачать Бесплатно |
![]() |
|
9.7 4.7/5 Stars |
Скачать Бесплатно |
![]() |
|
9.7 4.6/5 Stars |
Скачать Бесплатно |
Всем кто ездит заграницу, или даже в другой регион России (особенно Крым на данный момент) до боли знакома ситуация, когда блокируют видео «не доступное в вашей стране/регионе». Тот же ютуб частенько посылает при желании посмотреть что-нибудь ну очень важное и интересное (вот где без мата уж точно не обойтись), а Матч ТВ онлайн не доступен за пределами России. Для экспатов в частности, эта проблема будет наиболее актуальна, ибо без русского телевидения за границей видимо реально тоска зелёная.

Очень нехорошая ситуёвина. Скучно, блин, да ещё и кино не дают поглядеть, а компьютер тоскливо выдаёт — видео недоступно в вашем регионе.
А самое главное, что администрация заблокированного сайта или видео-материала в этом случае вообще никак не может помочь пользователям и гордо курит в сторонке. Они тупо закрывают доступ по просьбе правообладателя, которые оставляют за собой право ограничивать просмотр некоторых фильмов. Либо политика самого сайта не позволяет распространять материал за пределами страны. К сожалению, мы не в праве на это повлиять, поэтому нам самим приходится искать лазейки и обходы.
Что делать если видео не доступно в вашем регионе?
«Видео недоступно в вашей стране» или «видео не доступно в вашем регионе» — это одна и та же ошибка. Что делать?
В таких случаях многие используют браузер c VPN Tor, при подключении через который, нельзя отследить IP пользователя, а значит и определить из какой он страны. Значит и просмотр «закрытого» видео Tor тоже обеспечивает вполне нормально. Через Tor можно также без проблем посещать заблокированные сайты, единственное что, скорость интернета через Tor в разы ниже, ибо халявщиков много, а сервера не резиновые.
Ещё один способ — плагин для браузера iTop Private Browser. Некоторым товарищам с Украины, например, блоканули церемонию открытия Олимпиады. Как один из вариантов, можно зайти на любой иностранный сайт с видео Олимпиады, и если там есть ограничение по стране — выбирать в плагине нужную страну. Принцип прост — твой трафик теперь идет через прокси с айпи нужной страны. Есть ещё несколько халявных расширений типа Betternet или Zenmate, но в некоторых случаях и они не помогают.
VPN для обхода блокировок к заблокированному видеоконтенту
Тогда рекомендую юзать VPN сервисы, которые работают по схожему принципу. Они на порядок быстрее и безопаснее чем вышеупомянутый Tor, хотя бы потому, что не бесплатны. Но и платить тоже не всегда обязательно — вот, например, бесплатник Hidemy.name — на мой взгляд, один из самых устойчивых провайдеров. Прога очень удобная, а сервера всегда рабочие. Требует создание аккаунта и электронку и работает на устройтствах любого запаха и цвета, включая мобилу и планшеты. Пробник действует в течение суток, дальше можно продлить на день, месяц, полгода или год.
Как посмотреть недоступное видео на YouTube?
Для просмотра заблокированного геолокацией видео на YouTube, нужно сменить свой IP адрес на любой другой, подключившись к серверу в стране, где данное видео не заблокировано. Есть несколько способов маскировки IP адреса, вот самые надёжные:
1. VPN подключение. Удобный вариант, так как позволяет выбирать нужный сервер
2. Анонимайзер. Работает практически всегда, хотя нередки срывы соединения
3. Тор браузер. Требует установки, небольшие лаги скорости. Читайте подробнее о том что делать если Tor не работает.
>> Смотреть ТНТ онлайн за границей
>> Смотреть Amediateka онлайн за границей
>> Смотреть Русское ТВ онлайн за границей
Другие способы обхода блокировок в интернете
О других способах обхода блокировок в интернете я писал здесь и здесь. Ни тот, ни другой вообще не требует никакого впн, но качество и скорости периодически хромают. Поэтому для избежания геморроя я всё-таки рекомендую обзавестись добротным впн, который не только откроет заблокированные сайты, но и обеспечит полную анонимность и защиту в интернете. Ещё одним несомненным плюсом платных впн являются мобильные приложения. Просматривать заблокированное видео в любое время и в любом месте действительно круто!
Если порыться в интернете, то можно найти и другие варианты и мнения диванных экспертов, но принцип работы останется одним и тем же и будет базироваться на скрытии или замене айпи адреса. В некоторых VPN ведутся логи, поэтому не делайте ничего запрещенного и не ходите по сомнительным сайтам.
Часто задаваемые вопросы
Существует несколько причин, главная из которых — это лицензирование. Как правило, правообладатели любого лицензионного видеоконтента согласно договору с киностудией или производителем данного видео, имеют право трансляции этого материала только в оговоренных договором странах. Помимо этого, в зависимости от страны, популярные стримиговые сервисы как Netflix, Hulu или Amazon Prime вывешивают разный ценник на подписку на свой сервис
Да. Бесплатные VPN сервисы подходят для разблокирования видеоконтента. При выборе бесплатного VPN стоит обратить внимание на ограничения пропускной способности интернета. Например сервис Tunnel Bear предлагает всего 500 МБ по бесплатной подписке.
VN это легальный продукт, используемый не только индивидуальными потребителям, но и компаниями для обеспечения безопасности уязвимых данных от кибер преступников. Другое дело, это в каких целях вы его используете. Если определённый видеоконтент запрещён в вашей стране законом, то использование VPN может преследоваться законодательством.
Подключение через VPN в определённой степени замедлит ваше интернет-соединение. Для избежания потери скорости, стоит выбрать самый географически близко расположенный к вам сервер. Например, если вы живёте в Москве — используйте сервера в Латвии, Финляндии или Украине.
Да, безусловно. Мало того, многие VPN сервисы предлагают гарантию возврата денег. NordVPN, например, вернёт ваши деньги в течение 30 дней после покупки, если сервис вдруг вам не понравился.
Не все VPN сервисы принимают криптовалюту и Webmoney к оплате. Могу порекомендовать HideMy.Name VPN — отличный и хорошо зарекомендовавший себя в России сервис. Помимо криптовалют и Webmoney они также принимают к оплате Yandex.Money
Чтобы посмотреть недоступное видео на ютубе, нужно изменить свой IP адрес. Для этого потребуется либо vpn, либо анонимайзер. И то, и другое можно использовать бесплатно. Если видео недоступно в вашем регионе на телефоне, то принцип действия такой же. VPN приложения большинства провайдеров доступны на Андроиде и iOS
Подключившись к удалённому серверу через ВПН провайдера. Выбирать сервер нужно именно той страны, доступ к контенту которой вы пытаетесь получить. Например, чтобы посмотреть недоступное видео на YouTube, нужно понимать что то же самое видео может быть недоступно где-нибудь в Германии или Турции. В таком случае выбирайте сервер, расположенной в другой стране, где данное виде не заблокировано.
Allowed domains enables you to limit where your video embed codes can load and play. It’s a straightforward way to prevent someone from copying the video embed code from your website, and sharing it elsewhere.
You can set allowed domains at the account-wide level, meaning it will apply to all the videos in your account. Or, you can set allowed domains for individual videos, which will override any account-wide allowed domains settings.
When allowed domains is enabled for videos embedded on a website hosted by a third party, your videos will still load and play on your SproutVideo landing pages and video website according to their privacy settings.
Set Allowed Domains Account-Wide
First, select ‘Account Settings’ by moving your mouse over the person icon in the top right corner of the website.

Then, scroll down until you see the allowed domains box, and simply add in a list of domains or subdomains separated by commas for your site:

When finished, click ‘Save Playback Settings.’
Set Allowed Domains Per Video
First, navigate to the video you wish to enable allowed domains for, scroll down, and click ‘Additional Video Settings’:

Click the ‘Domain’ button and add in a list of domains or subdomains separated by commas:

Click ‘Save Settings For This Video’ to apply your changes.
Formatting Examples for Domains and Subdomains
Do not include the http or https protocol for your domains. Enter domains like ‘mycompany.com’ and not ‘https://mycompany.com.’
Wildcard (asterisks) are accepted for subdomains. An example list might be:

This list will allow your embedded videos to play on site1.com and www.site1.com (but not on any subdomains on site1.com), on any subdomain on site2.com (but not on site2.com) and only on the site3.com “videos” subdomain.
NOTE: If you would like your video to play on
example.comandwww.example.comyou must add both domains to this setting or use a wildcard:example.com,www.example.comorexample.com,*.example.com
In order to allow playback on Facebook while using the allowed domains feature, you’ll need to add the following to your list of allowed domains:
s-static.ak.facebook.com
In order to allow playback on Twitter while using the allowed domains feature, you’ll need to add the following to your list of allowed domains:
cards-frame.twitter.com
Was this article helpful?
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Comments
Hello there, been using the module for a while and it’s awesome so far, but now I hit a wall with the following:
While trying to get a video with explicit content the module does a workaround with an embed url, that’s what I understand so far(please correct me if I’m wrong here) but then that video has a domain restriction so the embed strategy fails.
So I’m doing this(pretty normal)
ytdl.getInfo(url ...: no error here, and I got the video itags info and everything elseytdl(url ...:[Error: status code 403]
This is the video https://www.youtube.com/watch?v=B3eAMGXFw1o (awful song btw)
I tried some things like using Referer in the headers(like here), but no luck.
As far as I could see the 403 happens in /videoplayback request.
If is there any more info I can provide please say so.
Thanks for your time.
PS: I’m running latest version 0.7.13 and just happens with the video above, I had not tested it with a video with similar configuration. I ran mocha test and all tests passed, just to see if I had some strange network setup
Hi there and thanks for your response.
I’m facing that problem from around a month so I don’t think is entirely youtube problem . I’m able to load the player but when I try to play it this is what I got.

Now, the video you provided plays just fine.
So the problem is the combination of:
- explicit content video which causes the module to have to use the embed url
- and the video being domain restricted for embed use
By the way if you try to use html embed in w3schools:
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <iframe width="420" height="315" src="https://www.youtube.com/embed/B3eAMGXFw1o" frameborder="0" allowfullscreen></iframe> </body> </html>
It will play nicely, but if you try the same thing in a local html file, the result will be same as shown above
UPDATE: If I follow the link directly from here in github https://www.youtube.com/embed/B3eAMGXFw1o the video works but if I paste the url in a new tab then I got the error as always. Definitely is the Referer (which in this case is this issue url), but not entirely, ’cause setting the Referer header in all the requests doesn’t seems to work(or maybe I did that wrong)
Hmm, it doesn’t work for me if I follow it from here :/
ok, very weird. and if you try the w3schools link? does not work either?
It doesn’t work either with w3schools.
well, just checked again and seems working for me.

It will be very useful if someone else can try this too so we can make sure that the domain restriction thing is working
Its working just fine for me

think i found a fix… at least worked for this one video
all i did is i added sts: '17186' to the query params of the get_video_info url in https://github.com/fent/node-ytdl-core/blob/master/lib/info.js#L87
that variable can also be found in the yt.setConfig(Line10 for me) and also in the base.js(Line 6641 for me)
hope it also works for u…
should also fix
#98
#83
It does work for me! O_O
Thank you very much!
MAMISHO
pushed a commit
to MAMISHO/node-ytdl-core
that referenced
this issue
Feb 10, 2018
Table of Contents
- 1 How do I fix video embed restricted for this domain?
- 2 Can I embed other YouTube videos on my website?
- 3 Is embedding a YouTube video copyright infringement?
- 4 Are movie soundtracks copyrighted?
- 5 How do I know if a film is copyrighted?
- 6 How much of a movie can you use without copyright?
- 7 Can I monetize videos with music?
How do I fix video embed restricted for this domain?
Restrict embedding on websites
- Sign in to Studio Content Manager.
- From the left menu, select Settings .
- In the Overview section, scroll to Block embedding on domains.
- Click User-uploaded content and select the rule you want to apply to websites that embed user-uploaded videos claimed against one of your assets:
Can I embed other YouTube videos on my website?
On a computer, go to the YouTube video you want to embed. Click Embed. From the box that appears, copy the HTML code. Paste the code into your blog or website HTML.
Is embedding a YouTube video copyright infringement?
It is clearly against copyright laws to embed an infringing YouTube video in your article, blog, or website. Such a video is not even legal on YouTube. Therefore, do not embed infringing YouTube videos into your online articles.
How do I post a YouTube video without copyright infringement?
When it comes to YouTube, it boils down to whether or not you can use someone else’s work in your video without licensing it. The safest way to avoid copyright violations when uploading to YouTube is to only use content that you have created yourself.
Can I use 10 seconds of a copyrighted movie?
There is no length that can be used generally. Rules of thumb are: If you use all of the original film, or a good part of it, that is a copyright violation. Adding ten seconds of your own commentary will still make it a copyright violation.
Are movie soundtracks copyrighted?
Like music clips, copyrights in film and TV clips are owned by a group of creators, each with their own copyright. While getting permission to use music clips is relatively easy, getting permission to use film clips is not.
How do I know if a film is copyrighted?
Examine the work for a copyright notice. On older works it may be on the title page or on the last page of the book. If the work is a film or a television show, the copyright is usually included at the end of the credits.
How much of a movie can you use without copyright?
There is no length that can be used generally. Rules of thumb are: If you use all of the original film, or a good part of it, that is in most cases a copyright violation. Usually, using an extract of 20 seconds from a one minute movie will be hard to defend as “fair use”.
Is it legal to use a song in a video?
But that’s far from the truth. The fact is that unless your video is only for your personal use (as in, not sharing it online anywhere) you must get permission from the copyright holder to use any music on YouTube. This is the best way to not run into any copyright issues – but doing so isn’t always easy.
Can you upload copyrighted music to YouTube if you don’t monetize?
In most cases, the owners will be happy to let you use their music in exchange for putting ads in your video. Sadly, this means you won’t be able to monetize your video. However, if your video was taken down, this most likely will affect your account standing and you may lose access to some YouTube features.
Can I monetize videos with music?
You can monetize content that you created as long as you still hold the rights to the video. If you’re signed with a music label, you can possibly monetize your video depending on the terms or limitations of that agreement. You may need to consult an attorney.
Hello
We are having a problem when we embed a youtube video in Rise 360 and play it from an LMS from chrome as it plays correctly in Firefox. The Rise course is hosted on a different domain than the LMS and is loaded via an iframe. When the course loads and we try to play the YouTube video, it gives us the error «Video unavailable. This video is restricted from being viewed on this domain». We have made a test of embedding the same video in an html and we have uploaded it in the same way to the LMS and in this way the video is played correctly with which the problem comes when we join rise, chrome and that the course is hosted in a domain other than the LMS.
Does anyone know where the problem could come from? Any restrictions that Rise has when you embed a youtube video or something.
Regards, and thank you very much
Addition: Domain-Level Restriction
Most video servers use the Referer HTTP header to implement domain-level restriction for accessing the domain-protected embedded videos.
This cannot be easily tricked at the client-side, because modern Web browsers disallow changing the Referer HTTP header from a client-side JavaScript fetch (AJAX) calls.
Bypassing by Server-Side Proxy
Beware: the Referer HTTP header-based domain restriction can be bypassed by a server-side script, which requests the video with spoofed HTTP referer and re-streams it to the client (as proxy).
For example, the «domain-level privacy» for Vimeo videos can be bypassed by a server-side code, which fakes the Referer HTTP header and the related cookies in a server-side HTTP request.
Bypassing by Client-Side Code Injection in Allowed Domain
An easy way to watch a domain-level restricted video (when you have its URL) is by client-side injection of the video player code in some allowed HTML page (using the Chrome DevTools).
Let’s see an example. We have a domain-restricted video in Vimeo, which cannot be embedded in the w3schools.com domain (this domain is not allowed by Vimeo):

In the same time, the video owner allows this video to be embedded in the domain softuni.org. We can open https://softuni.org, click [F12] to show Chrome DevTools and inject the video <iframe> code somewhere in the HTML page from this allowed domain:

Now the video plays correctly, overcoming the domain-level access restriction:

Note that this cannot be easily automated by a Web site developer, but can be done by end-users with tech expertise. User’s can also use a browser add-on, which fakes the Referer HTTP header, e.g. see the «Referer Control» add-on fro Chrome.








