The Golbasi Duty Magistrate Court gave the order on the request of Prosecutor Harun Ceylan, who was investigating the pages on social media.
The court decided that Facebook, the world’s biggest social network, would be blocked Turkey if Facebook fails to implement the order.
The court’s decision has been forwarded to the Presidency of Telecommunication and Communication and to the Access Provider Association.
Previously, a court in Turkey's southeastern Diyarbakir province ruled on Jan. 14 to block access to web pages showing Charlie Hebdo's latest cover featuring a cartoon of Prophet Muhammad.
The cover depicts Prophet Muhammad in a white dress and shedding a tear, holding up a sign reading, “Je suis Charlie” -- slogan popularized after Paris attacks -- below the headline "All is forgiven."
On Jan. 7, 12 people were massacred in a gun attack in the Paris headquarters of the Charlie Hebdo magazine.