Hong Kong CNN Business  — 

Chinese internet companies have started keeping detailed records of their users’ personal information and online activity.

The new rules from China’s internet regulator went into effect Friday, just the latest sign of the increasingly restrictive environment for tech companies like Tencent (TCEHY) and Alibaba (BABA).

The new requirements apply to any company that provides online services which can influence public opinion or “mobilize the public to engage in specific activities,” according to a notice posted on the Cyber Administration of China’s website earlier this month.

Companies will now have to start logging the activities of users posting in blogs, microblogs, chat rooms, short video platforms and webcasts.

Citing the need to safeguard national security and social order, the Chinese regulator said companies must be able to verify users’ identities and keep records of key information such as call logs, chat logs, times of activity and network addresses.

Officals will carry out inspections of companies’ operations to ensure compliance. But the Cyber Administration didn’t make clear under what circumstances the companies might be required to hand over logs to authorities.

According to their terms of service, messaging and social media platforms WeChat and Weibo are already required to hand over user information to the Chinese government upon request.

The new requirements affect some of China’s biggest tech companies and startups, including Tencent, Alibaba, Baidu (BIDU) and ByteDance. It is unclear if the new rules also apply to international companies, such as Apple (AAPL), whose iMessage service is available in China. Apple did not immediately respond to a request for comment.

Beijing has stepped up scrutiny of internet companies recently.

Earlier this month, the Cyber Administration shut down almost 10,000 social media accounts, saying they “trampled on the dignity of laws and regulations” and “damaged the healthy ecology of online public opinion.” In April, authorities ordered ByteDance to shut down a popular social media platform on which users often shared jokes, videos and GIFs, saying many of the posts were vulgar and displayed “improper public opinion.”

China heavily polices its domestic internet. The country’s vast censorship system regularly deletes any online posts or discussions about topics that Beijing deems sensitive, including criticism of President Xi Jinping, the Tiananmen Square massacre, or news that could spark mass protests.

Most of the world’s most popular social media and internet platforms — including Facebook (FB), Google (GOOGL) and Twitter (TWTR) — are banned in China.

But Google has been exploring ways to rebuild its presence in the Chinese market. And Facebook recently told US lawmakers that although it has no current plans to enter China, any effort to do so would take into account free expression and privacy concerns.

Serenitie Wang and Steven Jiang contributed to this report.