Categoria: Tech

Boring Video ADS on Youtube seem to download content from many URI all around internet. Thank to Firebug (Mozilla Plugin) it’s very simple to individuate domains from which your browser downloads ADS and Video ADS when you watch Youtube’s Video.

Red lines are contents not downloaded.

A very simple procedure to avoid Video Ads is to modify the (famous) HOSTS file letting your operating system to resolve the domains involved in the ADS network with ip 127.0.0.1 (your own system) actually blocking downloads of pages, code and ADS videos. I prefer this procedure than many others you can find on internet because it’s not necessary to install anything on you computer.

How to do it(I assume you have a Windows machine, if not, find the HOSTS file for your system):

Start Menu -> Accessories -> right click on “Command prompt” -> click on “Run as administrator“. A black window will open. If you have a Windows XP pc, simply open a commad prompt window;

in the command window run this command ipconfig /flushdns (“enter“!) to flush DNS cache of your PC;

close the command window.

Try to navigate Youtube, now you shouldn’t see any Video ADS before your preferred videos.

NOTES:

It may be the first host is no more strictly necessary, but if it remains in the hosts file is not a problem;

It may be introdused a delay from the page loading and the start of videos, only few seconds. That’s because browser has to wait the abortion of connections to localhost (127.0.0.1);

It may be possible not all necessary hosts are indicated in this post. Some hosts may change, depend of you location around the World due to resources distribution. Please, use FireBug to update your own host lists (and send me a message so I can update too! 😉 );

Playlists are not affected by any problem. You can enjoy your music without any ADS interruption.

Recently I moved this site to BlueHost.com because it is one of the approved WordPress provider and there are many hosting plans for all pockets, and Ive subscribed the basic one (http://www.bluehost.com/shared) with unlimited space, domains, websites, mails and more. I want to use this space also for some clients that have little websites so I can share the cost of the hosting.

When you open a BlueHost accont, you need to declare the main domain (in my case il lolloland.com) and, if you want to install WordPress under the root of you domain (in my case http://www.lolloland.com) all WP files are located directly under the /public_html/ directory that is the root of your space.

I’m a very tidy person 😉 so I want that all domains and all sites are in their own subdirectory and directories must have this structure:

/public_html/
domain1/
www/
domain2/
www/
www2/
domain3/
www/

First problem for my compulsive order is that BlueHost.com doesn’t permit to move the WP files under a subdirectory without change the URL of you site (example: http://www.lolloland.com/domain1/www). Of course you can move WP in a subdirectory, but I do not like at all to change standard WP files and links inside posts ( here is what a mean: http://codex.wordpress.org/Moving_WordPress ; you have to change the file index.php and copy it in the root directory of the server; you have to change permalinks, and so on). So I decided to work only on the .htaccess file.

I have read tons of pages on “how to move a WordPress site” but I didn’t find anything useful about this case: move a WordPress site from the document root to a subdirectory, without modifying WP original files, without modifying “home” and “site_url“, permalinks or links to media contents (/wp-content/uploads/... )

So this is the procedure I used:

I moved my old WP installation to BlueHost.com following these instructions HERE (WP was instaled under main domain, http://www.lolloland.com, and all files were in the root of server directly under /public_html/ directory);

After that I was able to transfer all other domains on BlueHost.com installing them in their own directories (/domain1/www, /domain2/www, …) using, in that case, the standard BlueHost’s WordPress installation procedure.

If you move other domains in your space on BlueHost you MUST NOT REMOVE the two lines of .htaccess file reguarding the directive RewriteCond %{HTTP_HOST} otherwise you’ll receive for these domains a “500 server error” message.

A very simple procedure to avoid Video Ads is to modify the (famous) HOSTS file letting your operating system to resolve the domain 2mdn.net with ip 127.0.0.1 (your own system) actually blocking downloads of pages, code and videos from the ads system. I prefer this procedure than many others you can find on internet because it’s not necessary to install anything on you computer.

How to do it(I assume you have a Windows machine, if not, find the HOSTS file on your system):

Start Menu -> Accessories -> right click on “Command prompt” -> click on “Run as administrator“. A black window will open. If you have a Windows XP pc, simply open a commad prompt window;

(without quotes) You should see something like the picture;[Update Feb 6th, 2014: last line has been added to try and solve what seems to be an architectural change of Youtube. You’ll probably see somewhere in some pages an iframe with a “Connection problem” note, don’t mind about it]

close notepad saving the file;

in the command window run this command ipconfig /flushdns (“enter“!) to flush DNS cache of your PC;

close the command window.

Try to navigate Youtube, now you shouldn’t see any Video ADS before your preferred videos.

The second one is the quick guide of the command “Restore-Mailbox” from MicrosoftTechnet and explains “Restore-Mailbox” syntax with also many examples that better fit the command in real-world scenarios.