The arrest was made following a complaint by the presidential media division, police said.
The website was hacked two days in a row, on Thursday and Friday. The websitewentoffline after the second attack.
Soon after the incident, the CID was tasked with carrying out the investigation with the assistance of the Sri Lanka Computer Emergency Readiness Team, local media reported.
Presidential media officials said the first attack occurredon Thursday evening, when hackers attacked the site and posted a message in Sinhala.
They urged the government to be more careful about cyber security and advised the president to hold a snap election.
The other demands were to stop the "irresponsible conduct" of the Prime Minister and to be more attentive to the problems faced by university students.