Pakistan's government has identified one of the videos hosted on the site as offensive/blasphemous/whatever, and announced its decision to block the entire site nationwide -- and to pretend that this will actually somehow magically block the video itself. But that's not what's happened.
Explaining this will require a brief (and therefore necessarily incomplete and slightly misleading) explanation of how Internet routing works. Bear with me, I promise you I'll make this painless.
All Internet traffic is broken up into packets, which are shuffled around by devices called routers. Routers do with packets what the human beings (and machines) in the postal system do with letters: they look at the destination address and move them one step closer to it. Just as no one person carries your letter all the way from your outbox to the recipient's inbox, no one router transmits your data all the way from source to destination.
You can view this process in action by using tools like "traceroute" ("tracert" on Windows, available in the "Network Tools" application on MacOS). If you play around with it, you'll find that your data usually traverses 5-25 routers to get where it's going.
How do postal service workers know where to dispatch your letter? They use a routing algorithm: letters for Chicago go in this bin, letters for New York City in this one, and so on. This works at all levels of the postal service, right down to the route carrier who does final delivery. None of them have a complete picture of the entire path your letter takes -- and they don't need it.
The same thing is true with routers and packets: routing algorithms enable them to cooperatively forward traffic even though any one router only has a partial picture of the data path.
Now we get to the fun part: how does a country like Pakistan block YouTube nationwide?
What they do is analogous to what you'd do by going to your corporate mailroom and issuing these instructions:
- If you see any outbound letters for Fubar, Inc., divert them to Room 101.
- If you see any inbound letters from Fubar, Inc., divert them to Room 101.
This will cause the mailing room staff to redirect anything to/from Fubar, Inc., neatly severing communications between your company and them. And whoever/whatever resides in Room 101 can then read those letters, or rewrite them, or just throw them in recycling.
The same thing can be done with routers at national or corporate boundaries: they can be instructed to divert inbound/outbound traffic. In the case of Pakistan's decision to block YouTube, the most likely place would be to a bank of web servers that's been set up to respond to all web page requests with "You are a naughty person" or something similar.
But that's not what happened. Pakistan didn't just instruct the routers at its borders to redirect traffic: it instructed them all. ALL OF THEM. Globally. Which they did, causing ALL web page requests directed at YouTube, worldwide, to be sent to Pakistan.
I'm going to omit the lengthy explanation of how that's possible and more importantly, why that's possible. The real question is:
Was this a mistake or was it deliberate?
Mistakes like this have been made before, by other network operators trying to make other network configuration changes. They often turn out to be off-by-one typos and similar, and tend to be fixed as soon as someone's phone rings off the hook. So this is certainly a possibility.
But it's also possible that this was a real attempt to either block or intimidate.
And the problem is that there's no way to discern those intentions by looking at the results. But given their previously-announced plans, and the vociferousness of their statements, I think the question above is legitimate.
Update 8 AM EST -- I wrote this late last night but held off posting it here to see if further developments happened. They have. The router instructions concerned have been modified and YouTube should now be gradually more accessible by everyone again. I haven't seen a published explanation from those responsible yet, but if it was a mistake, it's possible they're busy doing damage control. Coverage of this has now shown up in many places, including here (ZDNet), here (NANOG mailing list, here (NANOG mailing list again), and here (Telegraph, background).