"This law is not a regulation of the internet. The amendments introduced to the law are aimed at stopping the dissemination of illegal information on the internet," the government's state information agency said.
The Organisation for Security and Co-operation in Europe (OSCE), Europe's main human rights and security watchdog, has criticised the move.
Miklos Haraszti, representative on media freedom, said the bill would be a "step backwards" and urged Nazarbayev to annul the law.
"This law limits freedom of the internet and media freedom in general. Its adoption would be a step backwards in the democratisation of Kazakhstan's media governance," he said.
Kazakhstan is due to take over chairmanship of the OSCE in six months' time.
"Refusing to enact this law will send a strong signal that the forthcoming OSCE chairmanship of Kazakhstan in 2010 intends to fully honour the country's OSCE media freedom commitments," Haraszti said.
The bill must be signed by Nazarbayev before it can be passed into law.
Kazakhstan's political opposition, as well as independent and opposition media, are greatly worried by the growing media restrictions in the country, and have staged small protests in Almaty, the country's largest city.
Tamara Kaleyeva, head of Adil Soz, a Kazakh media rights group, said: "We are deeply embittered by this decision."
She added that the legislation would allow authorities to block any media outlet for its coverage of "elections, strikes, demonstrations and relations between ethnic groups, which are the most contentious social and political subjects".