How to make YouTube videos load faster on Windows (XP, 7, 8, Vista), Mac OS X, and Linux [Guide]

youtube_logoYouTube is owned by Google. Google is a web 2.0 company. They know how to manage server load. So then the question is why do so many people run into buffering issues when watching YouTube… even people on seemingly fast connections? This article provides more insights into this conundrum plus provides a tip on how to make YouTube videos load/buffer faster. Keep reading to learn more!


Techie Mitch Ribar had the same question. He had (has) a fast Internet connection and everything worked well but YouTube videos would buffer/load slowly. So he did a bit of digging and learned when you go to watch a YouTube video, you are served a cached video from a CDN (Content Distribution Network) and not from YouTube directly. ISPs (Internet Service Providers) throttle the connection speed from you to these CDNs, which is why YouTube videos load slowly but the rest of the Internet works just fine.

Ribar then figured out that by blocking two IP address ranges for these CDNs ( and, you block the CDNs and force YouTube to directly serve videos to you. ISPs do not throttle the connection speed between you and YouTube, which means you can view YouTube videos using the full speed of your Internet connection.

So to make YouTube videos load more quickly on your Windows, Linux, or Mac OS X machine, you need to do the same thing Ribar did — block the and IP address ranges.


As already mentioned, you need to block and IP address ranges. If you use a router and know how to administer it, you can block the IPs directly at the router level and thus allowing every computer connected to that router to benefit. However, if you don’t have a router or don’t know how to administer a router, you can block these IP addresses on your own Windows machine by adding a firewall rule.

To make YouTube videos load/buffer faster on Windows (XP, Vista, Win7, Win8, etc.), do the following:

NOTE: Please note the following method works only if you use Windows Firewall. If you use a third-party firewall, you can still use this trick but the method to block IP addresses varies from firewall to firewall. You need to figure out how to block IP addresses for your specific firewall; some firewalls will work by blocking and while others will work with subnetmask and subnetmask Please do post in the comments if you have directions on how to block IP addresses for a particular type of firewall, to help assist other dotTechies.

UPDATE: Windows XP users, please see comment #20 rthomson for instructions on how to make this work on Windows XP.

  • Open Command Prompt. Windows XP users can open Command Prompt by pressing Win + R, typing “cmd” (without the quotes” in the Run dialog, and hitting ‘OK’. Windows Vista, Win7, and Win8 need to make sure to run Command Prompt as administrator. On Vista and Win7 this can be done by opening Start Menu -> All Programs -> Accessories -> right-click Command Prompt and do ‘Run as Administrator’. On Windows 8 you need to open Search from the Charms bar, search for “cmd” (without the quotes), right-click or long-tap on Command Prompt, and then pick ‘Run as Administrator’ from the Advanced menu in the bottom-right.
  • Once Command Prompt is open, enter the following command (note: you can copy the command paste it into Command Prompt by right-clicking -> Paste):

netsh advfirewall firewall add rule name=”YouTubeTweak” dir=in action=block remoteip=, enable=yes


  • Once inputted, hit Enter on your keyboard and the rule will be added:


  • Close Command Prompt.

Done! Now YouTube should, hopefully, be a lot faster for you.

If you ever want to remove the rule you just created, repeat the same process but enter the following command: netsh advfirewall firewall delete rule name=”YouTubeTweak”.


To make YouTube videos load/buffer faster on Mac OS X, do the following:

  • Open Terminal.
  • Once Terminal is open, enter the following command: sudo ipfw add reject src-ip in
  • Hit Enter on your keyboard. You will be asked to input admin password. Input it.
  • Now enter the following command and hit Enter on your keyboard: sudo ipfw add reject src-ip in
  • Close Terminal.

Done! Now YouTube should, hopefully, be a lot faster for you.

If you ever want to remove the rules you just created, open Terminal, run the command sudo ipfw list and note the reference numbers for the two rules you created. Then run the command sudo ipfw delete [REFERENCE NUMBER] with [REFERENCE NUMBER] being replaced with the reference number for the first command; then do it again for the second command.


To make YouTube videos load/buffer faster on Linux, do the following:

  • Open Terminal.
  • Once Terminal is open, enter the following command: sudo iptables add reject src-ip in
  • Hit Enter on your keyboard. You will be asked to input admin password. Input it.
  • Now enter the following command and hit Enter on your keyboard: sudo iptables add reject src-ip in
  • Close Terminal.

Done! Now YouTube should, hopefully, be a lot faster for you.

If you ever want to remove the rules you just created, open Terminal, run the command sudo iptables list and note the reference numbers for the two rules you created. Then run the command sudo iptables delete [REFERENCE NUMBER] with [REFERENCE NUMBER] being replaced with the reference number for the first command; then do it again for the second command.


This trick takes less than two minutes to do but can save you a whole lot of time while watching YouTube videos. Enjoy!

[via Mitch Ribar (1), (2]]

Related Posts

  • Ignacio Rios

    Thanks Ashraf worked like a charm

  • Tarra.exe

    Unfortunately, I’m on Mac Serria and Terminal doesn’t give me that. ipfw is not found

  • nicolasbarnas


  • ellen hardy

    Wow, you can see my other tips here

  • Stonr

    Now this is on the internet CDN’s will find its way for new ip addresses…

  • Bill

    Hi. The command for Linux is incorrect. I get the following message”
    Bad argument `add’
    Try `iptables -h’ or ‘iptables –help’ for more information.

  • Haywood Jablome


  • 3Sergeant_Alpha

    HOLY $#!T… I’m genuinely blown away! MOST of the “Increase YouTube Speed” tricks that you find online these days either don’t work at all, or have so little effect that it wasn’t worth the time! But, this one actually works AMAZINGLY WELL! I’m on a wideband service with a top speed of 150 Mbps downstream; I buffered 100% of a 4:06 minute video ten times before this trick and ten times after the tweak, using NetSpeed Monitor to clock the speed as the video buffered; I took the average speed of each individual load, added them up, and then divided by 10 to get the average speed of each of the 10 downstreams. Before using this tweak, the 10 downstreams averaged out to 3.267 Mbps. After activating this tweak the 10 downstreams averaged out to 26.646 Mbps! That is literally over EIGHT TIMES FASTER! I am shocked and amazed, and I am VERY grateful to both Mitch Ribar for discovering this and to Ashraf for posting it! Kudos to you both! I only wish I had known about this sooner… I could have saved SOOOOO MUCH time! Thanks again to both of you!!!!!

    ~With Respects and Gratitude from a Fellow Techie,
    Jared in Long Island, NY

  • cinthia

    Now all of youtube’s videos are a blackscreen !? :( even in deleting the rules.

  • DaddyBean

    To implement these rules in the “Tomato” firmware on a NetGear WRT54GL router (or any router that supports Tomato):

    Log in to the router admin page
    Select “Administration”
    Select “Scripts”
    Select the “Firewall” tab
    Paste the following:

    iptables -A INPUT -s -j DROP
    iptables -A INPUT -s -j DROP

    …and click “Save” at the bottom.

  • J Walker

    As a follow up, I found out how to block sites with Zone Alarm and I did so. I blocked both the range of addresses recommended and the address plus the subnet number. The latter seemed to provide the most help. There is no doubt that the article is dead on at least for my case. I believe that sites will be throttled down and we will be forced to buy faster internet speeds. I need to keep my DSL until my contract runs out but then a faster speed will be what I will look for. Thanks again for the excellent article.

  • J Walker

    This article describes exactly my problems. I have Win 7 with DSL, 1.5M download and 100K upload. Until about a month ago I could view youtube well, but then I got stops an starts and often a complete freeze. I have checked nearly everything. My ISP recommended going to a faster speed on upload. I know my speeds are not that fast these days but I can view videos from other sources than youtube well. I decided to try blocking the recommended IP addresses and switched Zone Alarm firewall on. I had been using the Windows firewall. I could not figure out how to enter the addresses to be blocked but the Zone Alarm firewall fixed my youtube problem anyway. It seems obvious that ISPs have reduced the speeds for some sites which no doubt handle Netflix as well as youtube. I will look further into blocking IP addresses. I have a router but need to learn how to block with it. All I can say in THANKS.

  • Suze

    Here are the directions for those using Norton Internet Security 2013’s Firewall:

    You can create a new firewall rule to block an IP range this way:

    1. Open Norton Internet Security
    2. Click on Settings
    3. Go to the Network tab
    4. Under Smart Firewall, click Configure next to Advanced Settings
    5. On the new window click on Configure [+] by Traffic Rules
    6. Click on Add
    7. In the Add Rule wizard, select Block, and then click Next
    8. Select the type of connection that you want to block (“Connections to other computers”), and then click Next
    9. Select “Only the computers and sites listed below” option, and then click Add.
    10. Here you can configure one or more IP ranges: Select “Choosing a range” option, and enter the addresses (e.g., to; click Add for each range; click OK, and then click Next
    11. Use “TCP and UDP” and Select the ports and protocols the rule should monitor (“All types of communication”) and then click Next
    12. If you want the logs for this rule to be saved, check Create an event log entry, and then click Next.
    13. In the “What do you want to call this rule?” box, type a name for the rule (“YouTubeTweak”), and then click Next
    14. Review the new rule settings, and if they are correct, click Finish
    15. Click Move Up to move the rule to top, and make it a higher priority if desired
    16. Click OK / Apply and close Settings.

  • Mike

    For anyone using symantic endpoint protection on Windows 7 – use this site and use the IP ranges,

    I used this site for instructions:

    Thanks a lot.

  • anj

    how can i run as an admin? password wont work

  • test a website

    Woah this web site is excellent i really like studying your articles. Continue the nice paintings! You recognize, a lot of people are seeking all around for this information, you can assist them to drastically.

  • vishwaravi

    Dear Ashraf,
    Your site is quite interesting and informative .This site -Reg – How to make you tube videos load faster without buffering on windows xp / mozhilla firefox . How to save my previous settings so that i can egt back to older one if this method doesn’t work for me .Am trying to avoid risk of doing the change till i hear from you sir !! .I will be very thankful if you can help me .
    Does any other free downloadable music player run this youtube videos directly ?

  • recon

    man,this shit really works

    thx a lot

  • Zula

    I dont have a 3rd party firewall and neither windows firewall activated, so cmd tells me(translation) “a problem occured when the firewall were contacted. check if the service Windows-Firewall is activated and try again.” but i cant start W-Firewall either…

  • leo

    I have a win7 but it dosnt work it still loads slow

  • abhas

    This all are fake things because when i done it i found that my youtube has only black screen any videos accept mine were not working

  • RaeRae

    [@rthomson] I did this and saved it and everything it’s on my desktop I rechecked just to make sure everything was right…. But youtube still isn’t loading and I’m using Windows Xp actually I just had everything updated everything else works fine but youtube is being a pain in the ass!!!

  • someone

    Netsh AdvFirewall Firewall Commands:

    Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

    —NOT WIN XP—-

  • Damian

    please can someone show me exactly how to make this work and how to enter the codes or what ever in pleeeeaase

  • Joanna


    I have XP SP3 with the Windows Auto Update Firewall.

  • Joanna

    I did exactly as instructed, but got back “The following command was not found”, followed by the string command, minus netsh. What am I doing wrong?

  • rthomson

    [@tru89pet] First thing to try is to disable your software and hardware firewalls to see if that fixes the problem. If it does, then switch each one on separately to see which one is blocking the traffic. Make sure that you turn both firewalls back on after the test.

  • tru89pet

    [@rthomson] Your method does not work on XP. I just tried it, and the youtube vids don’t even load now. Any advice? I also looked at s3c’s comment and my IPSEC Services were already to “Automatic” so I’m not sure what the issue is.

  • skilo

    The linux command does not work.

    Bad argument `add’
    Try `iptables -h’ or ‘iptables –help’ for more information.

  • s3c


    Something I can add to your advice, since I had to do it in order to make your fix work:

    After I followed all the footsteps I noticed that I had “IPSEC Services” disactivated.
    I had to run “services.msc” and then find “IPSEC Services”, right click “run” and change the setting from “Manual” to “Automatic”. I hope I explained myself well, I have winXP in Italian (and English is not my mother tongue).

  • rthomson

    [@s3c] I’m happy to have helped.

  • s3c



  • vanierstein

    Would integrating the commands with Vista’s Firewall advanced settings via this work ? Also,how about Netflix,Hulu,Crackle,etc. See HERE :

  • Rob

    This method did not do a god damn thing. Ive restarted my computer, Ive tried other browsers, this doesn’t do a damn thing. On Win8, ignore this method

  • muhammad


    Any idea how to remove this rule from my MAC OSX 10.8.2

    i already opened the terminal and i got only one number!!

  • Gideon


    Yes but sorry for this I write for Premium version how to block ip address if some have problem how to make this steps.

  • Ashraf

    [@Gideon] Online Armor Free doesn’t have Advanced Mode.

  • Gideon


    Online Armor Firewall block ip address with step open Firewall go to Option activate Advanced mode and then go to Firewall in Restrictions leave checked Allowed but in Except for: then click Add and enter ip address in 3 textbox with mask both start and end address leave black. that is ok now open youtube and watch video fast and not slow.

  • Ashraf

    @Everyone: Sorry, I wasn’t aware the commands wouldn’t work for Windows XP firewall. Updated now.

    [@rthomson] Thanks! I’ve included an update pointing XP users to your comment.

  • As other have stated in my testing it does not work with any version of XP or Server 2003. It seems to only work with Vista or Server 2008 and above. while netsh does exist it keep giving an error “The following command was not found: advfirewall firewall add rule name=”YouTubeTweak” dir=in action=block remoteip=, enable=yes”. So it appears the older versions of Windows will have to find another method to block the IP range.

    rthompson thanks for the method of making it work on XP. I hope to get my router up to date enough to make it work but until then I hope to use this on my wife’s old computer.

  • rthomson

    I modified a script for an earlier SP of XP for my X86 XP SP3. Hope it helps.

    01 Click Start > Run >type MMC press OK.
    02 In the console click File > Add/Remove Snap in.
    03 In the Standalone Tab click the add button.
    04 Select “IP Security Policy Management” > ADD > Local Computer > Finish > Close > OK.

    You should now be back to the console.
    05 In the left frame right click “IP security policies on local computer” > Create IP security policy.
    06 Click Next and then name your policy “You Tube” and type a description “Block You Tube IP’s for faster streaming”.
    07 Click Next then uncheck “Activate the default response rule” then click Next .
    08 Leave the Edit properties ticked and click Finish.

    You should now have the “You Tube Properties window” open.
    09 Ensure “Use Add Wizard” is checked and Click ADD > Next.
    10 Leave “This rule does not specify a tunnel” selected and click Next.
    11 Leave “All network connections” selected and click Next.
    12 Leave Authentication Method as “Active Directory default…” and click next
    13 Click yes to Kerberos warning

    You should now be on the “IP filter” list.
    14 Click Add
    14 Set “Name” and “Description” to “Blocked IP List”

    15 Ensure “Use Add Wizard” is checked and Click “Add”.
    16 Click Next to continue.
    17 The “Source address” should be set at “A specific IP Subnet”
    18 Enter IP address and subnet mask click Next.
    19 Set “Destination address” to “My IP Address” and click Next
    20 Leave “Select a protocol type” as Any and click Next.
    21 Check “Edit properties” and then click Finish.
    22 Click OK
    23 On the “Description” tab. Set the description to
    24 Click OK

    Repeat steps 15 to 24 using IP address and subnet mask description to

    25 Click OK
    26 Select “Blocked IP List” and click Next
    27 Ensure “Use Add Wizard” is checked and click Add > Next
    28 Set “Name” and “Description” to “Block” and click Next
    29 Select Block and click Next
    30 Uncheck “Edit properties” and then click Finish.
    31 Ensure Block is selected and click Next
    32 Uncheck “Edit properties” and then click Finish.
    33 Select “Blocked IP List” and click Apply > OK
    34 Right click on the “You Tube” policy choose ASSIGN.
    35 Close the console window and click Yes to save the settings.
    Put the save file on the desktop in case you need to tweak it otherwise you have to reload the snap-in.

  • aqua

    have the same message on xp but it seens to work

  • Sammai

    Thanks so much for the tips.

    I have Windows XP and when I tried the command prompt I received an error that advfirewall file was not found.

    I tried it on my other computer with Windows 7 and it works. So I guess XP might be having a different file name for the advfirewall.

    Thanks in advance.

  • hatman

    @Ashraf Did not figure it out. My streaming is not a problem for me so I’m not going to do it. Stuff like this usually messes up my computer so I’m leaving good enough a lone.

  • Ashraf

    [@Shawn] Oh I see. Thanks for clarifying

    [@rthomson] No problem. Glad to here you had it right :-)

    [@hatman] Welcome! Did you get it to work?

  • hatman

    @Ashraf Thanks for the great info and the reply :-)

  • rthomson


    Thanks for the correction. Cut and Paste error by me.
    However It was correct in my firewall setting.

  • Shawn

    Sorry about my post… seems part of it went missing and well I didn’t notice..

    What I was saying is the list that is there is the primary exclusive addresses I let in first and anything that tries to re-route afterwards gets blocked…

  • Ashraf

    [@Shawn] Are those other CDN IPs that are throttle? I didn’t quite understand your comment.

    [@o(o.o)o] I’m not sure how Ribar came up with the IP ranges but I assume there is a reason he didn’t /16 for that IP.

    [@Naveed] No idea why but it automatically picks YouTube because you need to be served videos from somewhere, and if you block CDNs then YouTube is the only other source.

    [@PixelWizard] Welcome!

    [@rthomson] You have you subnetmasks switched, but yes that should work. It should be subnetmask and with subnetmask

    Thanks for the directions on VIPRE.

    [@hatman] Do you know how to log into your router? Google for directions on how to block IP addresses for that specific router. And you may have to do subnetmask and with subnetmask instead of with /16 and /24.

    [@Ian] Welcome!

    [@Donna] Welcome! Glad you enjoy dotTech.

    [@Stephen] No idea.

    [@johnmw1] If I had it I would help but I don’t :-( Did you google how to block IP addresses with Kaspersky FW?

  • johnmw1


    Great article! I would really like to know how to do it with Kaspersky FW?


  • Stephen

    How come they throttle the CDNs but not the YouTube addresses?

  • Donna

    Awesome. Thanks! I look forward to the daily newsletter and articles like this is the reason why. Well not totally why. The cat pictures are pretty neat too! (-;

  • Ian


    Thank you …

  • hatman

    I am unsure how to enter those numbers in my router.

    My Router – Cisco DPC3825 DOCSIS 3.0 Gateway

    **block and IP address**

  • rthomson

    I could not enter the x.x.x.x/x format but it did let me use with mask
    and with mask

    I am a lamer when it comes to IP’s so please let me know if there is a problem with the above but it has made a massive improvement to YouTube streaming. Thanks for the great tip.

    Vipre Firewall. Go to Firewall Settings. Select Zones and click on the Untrusted Networks. Click Add and add the IP’s and Mask there using a separate entry for each of the 2 entries.

  • PixelWizard

    Worked! Wow – thanks.

    (This OS is Vista, with Windows Firewall.)

  • Naveed

    2 questions : why do the isps throttle traffic from the cdns? If you block these addresses, how does it automatically choose YouTube?

  • o(o.o)o

    Since is used by google to serve youtube content, might as well block the whole /16 subnet instead of just /24 subnet indicated above.

  • Shawn


    Theses are all the ones I’ve dealt with to solve that issue and also blocked the cache folders of my isp. Also with WebSite Sniffer from nirsoft I’m able to monitor all the junk files creted and site accessed to block the rest of the crap.

  • Ashraf

    For those of you that have Online Armor Free: Online Armor Free, unfortunately, cannot block specific IP addresses — it can only block domain/IP address combos.