Try to mark youtube
/ip firewall layer7-protocol
add name="youtube.com test" regexp="^.+(www.youtube.com).*\$"
and drop it in firewall
This is worse! It will block not just YouTube, but any web resource that mentions it in any way! Granted that people rarely write out "
www.youtube.com" in real content (and instead just say "youtube"), but hell - this very forum page will be blocked, because it contains "
www.youtube.com".
And if you're talking about adding this as an
additional restriction to the IP address - that won't work, because both GoogleDrive and YouTube use HTTPS. Thus, their content is unreadable. The only packets this could be applied to are the DNS messages, and the initial HTTP request (which would redirect you to the HTTPS page, except that if you go through Google, they'll redirect you to HTTPS instantly).
I guess to block just YouTube, you could block DNS requests to any DNS server other than yours, and make yours redirect to a non-existent IP, which would
effectively block YouTube to any non-expert user. I mean, the only way for a user to add it back is if they modify their hosts file to include youtube.com and
http://www.youtube.com both resolving to GoogleDrive's IP address... Few users would go to that length. And if you want to make sure that
they can't access YouTube either... You MUST sacrifice GoogleDrive. There's no workaround for THAT part.