He was responding to Ethiopian reporters’ questions about the government’s disabling of social media sites earlier this month.
Ethiopian authorities said the sites were disabled during national school examinations so students would not be distracted.
Critics said the government has no legal basis to deny the freedom of expression to millions of citizens.
Gates said each country “decides what the rules are going to be in terms of pornography, hate speech . what is allowed and what’s not allowed.”
He added that making the internet low-cost and available is good for economic growth.
Gates was visiting Ethiopia to discuss health and agriculture.
Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.