Zouhair Yahyaoui, the founder and the editor of satirical website Tunezine, was also found guilty of illegally using an internet connection.
Yahyaoui had published on his website a letter questioning the independence of the judiciary.
He had also used the website to discuss a tourism boycott as a means of forcing the government to improve its human rights record.
He refused to attend the court to hear the sentence in protest against the judicial system.
In Paris, media advocacy group Reporters without Borders (RSF) called the ruling "scandalous" and said the country's leadership was trying to silence an outspoken opponent.
It is the first time the Tunisian judiciary has taken action against dissident activities on the internet in the country.
Popular site
Police arrested Yahyaoui on 4 June at the Tunis internet cafe where he worked.
They seized computer equipment from his home, obtaining the code to his site, which has since become difficult to access in Tunisia.
Using the pseudonym Ettounsi (the Tunisian), Mr Yahyaoui was the first to publish an open letter to the Tunisian president written by his uncle, the former judge Mokthar Yahyaoui who was dismissed last year for criticising what he called "the total lack of independence" of the Tunisian judiciary.
The site, set up in July last year, is very critical of President Ben Ali's regime.
On the occasion of last month's constitutional referendum, Yahyaoui held his own online consultation, asking visitors if they thought Tunisia was "a republic, a kingdom, a zoo or a prison".
The forum is said to have drawn a very large number of participants.
'Censorship'
Yahyaoui's arrest was criticised by Amnesty International and RSF.
"We demand the immediate release of Yahyaoui and the reappearance of Tunezine.com," RSF's secretary general, Robert Menard, said in a letter to Tunisia's interior minister.
RSF say the website has been censored by the authorities from the start.
But each week, a list of "proxy" addresses has been available so Tunisians could get round the blockage and access the site.