The 18-year-old student, identified as MFB and from the island of Sumatra, was found guilty of making defamatory comments about Mr Widodo online.
He fell foul of the country’s internet law by using fake accounts to post inflammatory messages.
He did not appeal and his lawyer said there were no defence witnesses.
The teenager had challenged the police to arrest him for the comments on Facebook in July 2017.
MFB was arrested in August for posting the messages and memes about both the president and Indonesia’s police chief, Tito Karnavian.
A number of people have been accused through the country’s internet law of using social media to insult the president, make slanderous comments and post fake information.
Rights activists have criticised the law, saying it is draconian and a free speech threat.
Amnesty International says that “broad and vaguely worded laws (have been) used to arbitrarily restrict the rights to freedom of expression, of peaceful assembly and of association” in Indonesia. (Courtesy BBC)