YouTube self-defence

Håkon Robbestad Gylterud

March 2019

YouTube is Google’s1 huge video streaming site. It has a large number of creators who upload their content there2. Some video content is good, most of it is bad – and some of it directly harmful. Google is intent upon steering YouTube viewers3 to bad and harmful content. Therefore I have composed a list of defence strategies for YouTube viewers.

Blocking ads

The most obvious attack vector on YouTube is ads trying to manipulate you while you are watching the good content.

The most reliable way to block ads right now is to use Firefox with the uBlock Origin plugin (which is also available for Android and other platforms).

Hiding suggestions

The next attack vector is located on the right hand side of the screen:

YouTube suggestions marked in red.
YouTube suggestions marked in red.

In addition to taking up space which could be used for the video, this space is often filled with bad video suggestions.

  1. First, install uBlock Origin.

The feature of uBlock Origin we are going to use can actually, be used for blocking parts of any page, and is a useful way to get rid of clutter on pages you visit often.

  1. Right click on the white space close to the suggestions:
This is where you should right click.
This is where you should right click.
  1. Select the uBlock origin block option
The uBlock option in the right-click-menu.
The uBlock option in the right-click-menu.
  1. Check that the red area covers the suggestion section.

Currently this page-element is called ###secondary. You can use the mouse to select the correct region if you right-clicked in the wrong place.

uBlock shows you which part of the web-site you are blocking.
uBlock shows you which part of the web-site you are blocking.
  1. Click Create to create the filter, removing the suggestions.

While you are at it, you could create another filter to block the comment section YouTube.

Downloading YouTube videos

Sometimes the best way to protect yourself is to avoid the fight entirely. There are tools available which will allow you to download a video from YouTube, without visiting the site yourself.

If you are comfortable in a command line, the youtube-dl is straight forward to use:

youtube-dl <link-to-video>

Actually, youtube-dl will download videos and music from a lot of different sites – not just YouTube!

Blocking auto-play

One of the ways YouTube controls what you watch is by automatically playing a new video just after the one you were watching finished. As a user you have no control over what video YouTube choses for you to see next. There is a button to disable auto-playing, but it is completely under YouTube’s control. In order to take back control, you can disable autoplaying video content.

Firefox allows you to change your autoplay settings by going to the special page about:config.

In recent versions, the main option is called media.autoplay.default and can have one of three values (See table below).

To block autoplay completely, set the value to 1.

media.autoplay.default value Effect
Value: 0 Autoplay allowed.
Value: 1 Autoplay blocked.
Value: 2 Prompt the user.

There are more option related to autoplay, such as media.autoplay.allow-muted, and I wish it was easier to find their documentation from Firefox’s GUI. But usually, a bit of searching will give a hint.

Surf in a private window

If you are logged-in with a Google Account while watching YouTube, Google will remember what you have been watching and use this information for whatever it wants. Google has privacy options, but they are completely under Google’s control and therefore we cannot trust them.

Even if you do not have a Google Account, Youtube contains other tracking mechanisms which allow them to collect data about your viewing.

Therefore, always open YouTube in a private window.4 You should also be using tracker protecting software such as Privacy Badger.

Channel RSS feeds

Feeds (RSS or Atom) are way to get updates on a particular site. There are a lot of different RSS readers to be found5, for instance as Firefox plugins. If you use a feed reader, you can get updates from the channels you are interested directly in the FeedReader. The advantage is that you do not need a Google Account to read the feed.

Currently, you can get a feed URL for a channel in YouTube, in the following way:

  1. Take the address of the channel.
  2. Copy the code at the end (after channel/).
  3. Paste it at the end of this address:

Now you have a feed address which you can give you any RSS feed-reader, to receive updates when the channel releases new videos.

Some feed readers will do this conversion for you automatically if you give them the channel url.

  1. Google did not create YouTube, but bought it in 2006, after it became popular.

  2. If you are creating a video which you want to release upon the public, consider putting it somewhere more friendly to your viewers.

  3. Your children included!

  4. I have actually just turned off all history and stored data in Firefox, except for bookmarks. I aggressively bookmark and tag pages I visit, so that I still get a useful auto-completion in the address bar on stuff I have visited before.

  5. Personally, I use newsboat, because I can then have it running in tmux on my server.

Expecting a comment section? Feel free to e-mail me your comments, or otherwise contact me to discuss the content of this site. See my contact info. You can also write your opinion on your own website, and link back here! ☺