A judge has sentenced a Sydney teen to a 21-month social media ban after he sent repeated threatening and offensive messages to an ex-girlfriend and another person.

The 18-year-old was ordered to delete all Facebook, Twitter and Instagram accounts in his name within 24 hours. He is also not allowed to access the social media sites under an alias.

The ban is a first for Nova Scotia, but information technology expert Tino Kilronomos says it is incredibly difficult to block someone’s access to social media.

“You can do so many things, tips and tricks, by just changing your identity online, your username, your profile picture, where you live,” says Kilronomos.

“The individual here can just get a different phone or device and can access the Internet with another device and they’re back online again.”

While a social media ban may be difficult to enforce, law professor Wayne MacKay says it’s a positive step forward.

“I think this is the kind of thing that will send a message about misusing social media and that one way to really make people feel the pain of that is to disconnect them from social media,” says MacKay.

MacKay believes more social media bans will be imposed by the courts in the future, but he agrees they will be difficult to police.

“But many things a probation officer has to deal with are difficult to monitor,” says MacKay. “For example, not hanging around with certain friends who have criminal records, that’s difficult to monitor. If your licence is suspended, that you can’t drive, that’s difficult to monitor.”

Kilronomos says experts can track Internet usage through network traffic analysis, but the only way to truly block a person from social media is to monitor them 24/7.

“There are ways to sniff the cable, basically, if you want to see what’s going on back and forth,” he says.

“There’s lots of things you can do, but it’s going to be very challenging and difficult to prevent any individual from accessing the Internet.”

With files from CTV Atlantic's Amanda Debison