Google and Facebook must take responsibility and remove extremist content on their platforms, WPP CEO Martin Sorrell told CNBC on Friday, but he added that advertisers boycotting video service YouTube "doesn't make sense".

A number of major brands pulled ads from Google-owned YouTube this month after they were appearing next to inappropriate content. AT&T, General Motors and Johnson & Johnson are among the companies who have suspended ads on YouTube.

Sorrell said that there "may be an argument" for temporarily suspending ads on YouTube, but a permanent boycott wasn't a good move.

"Boycotting what is one of the most powerful, if not the most powerful medium, doesn't make sense," Sorrell told CNBC.

Last year, WPP spent $5 billion advertising with Google on behalf of clients, the CEO told CNBC in December, making it the largest digital platform it spends on, compared to $1.7 billion for Facebook and $90 million for Snapchat. Google is likely to make $72.69 billion in ad revenues in 2017, according to eMarketer data.

Sorrell said WPP has partnered with Google to introduce technology to monitor where ads are appearing, but did not give further details and admitted that "you can't make things 100 percent brand safe." The WPP CEO said you can deal with the issues around ad placement effectively but so far there hasn't been a good response.