In 2016, months before an attempted coup, Turkey moved even more aggressively to censor content on the internet, as the number of people prosecuted for insulting Mr. Erdogan in posts on social media skyrocketed. At the same time, internet trolls loyal to the government used social media platforms to attack critics and journalists.
In 2017, the country shocked many international observers when it banned Wikipedia, a restriction that was lifted only this past January.
Last summer, Turkey gave its media regulatory authority sweeping control over streaming services, including entertainment sites like Netflix.
Netflix, which is the most prominent streaming service in Turkey, has already run into difficulties with Turkish censors and has had to edit content of its Turkish-produced programs, removing cigarettes and blurring suggestive gestures.
Last week, Netflix canceled its fourth Turkish production a day before filming was scheduled to begin, after the Turkish media regulatory authority refused permission for filming. Ece Yorenc, the screenplay writer, said the authority had refused to grant permission for the series “If Only” because of a gay character in the series. Netflix chose to cancel the entire series rather than change the content, she said.
The issue of social media content took a personal turn more recently, when Mr. Erdogan’s newborn grandson — the fourth child of his daughter, Esra Albayrak, and Berat Albayrak, who is also the finance minister — was insulted on various social media platforms.
“Those spaces where lies, defamation, attack to personal rights, character assassinations are running wild, should be put in order,” Mr. Erdogan told party officials in a televised speech on July 1.