SINGAPORE—China has ordered its largest internet companies to stop blocking links from their rivals on their apps, as Beijing seeks to boost competition in a sector dominated by a handful of companies.

Authorities have made the move against blocking external links a key focus of a campaign that started in July, after receiving multiple complaints from users, an official with the Ministry of Industry and Information Technology said Monday.

Companies such as Tencent Holdings Ltd. , Alibaba Group Holding Ltd. , ByteDance Ltd. and Baidu Inc. were among those called to a meeting last Thursday with Chinese officials to discuss the issue, people familiar with the matter said.

Moves blocking app users from accessing rivals’ services from within those apps have become common practice among large technology companies in China.

The ministry’s campaign is part of a wide-ranging crackdown on China’s technology sector. The regulatory measures have shaved many billions of dollars off the market capitalizations of these companies. Internet titans such as Alibaba and Tencent have been hit by large fines for infractions, including forcing merchants into exclusive sales arrangements and improperly reporting mergers and acquisitions.

The problem of platform interoperability has been an issue for several years, analysts said, and a source of annoyance for Chinese consumers and the subject of lawsuits.

In 2018, when ByteDance’s short-video platform Douyin started growing in popularity, many users realized they couldn’t directly click through to Douyin links that were shared on Tencent’s ubiquitous WeChat messaging platform. Consumers also can’t smoothly open links from Alibaba’s e-commerce platforms, such as Taobao and Tmall, from within WeChat.

Tencent said it supports the government’s guidance and will make necessary changes in phases. An Alibaba spokeswoman said it will fully comply with regulatory requirements, echoing a statement made by Chief Executive Daniel Zhang in an August earnings call.

In July, The Wall Street Journal reported that Alibaba and Tencent were considering opening up their services to each other. People familiar with the matter told the Journal that Alibaba could introduce Tencent’s WeChat Pay to Taobao and Tmall. Tencent could also make it easier to share Alibaba e-commerce listings on its WeChat messaging app, some of the people said.

“It’s one more sign to these companies that they have to get in line and they have to open up to competition,” said Ben Cavender, managing director of industry researcher China Market Research Group.

The rules will be phased in, a ministry spokesman said in remarks posted on the ministry’s website on Monday, without giving a clear timeline. Blocking links hurts consumers’ rights and disrupts market order, and companies that don’t abide by the rules will be punished, he said.

In an online commentary published Saturday, the Communist Party’s top discipline watchdog, the Central Commission for Discipline Inspection, said Beijing’s antitrust campaign may have a negative impact on the country’s tech giants in the short term, but “will be the best choice in the long term.”

Tencent’s Hong Kong-listed shares are down 15% this year, while Alibaba’s Hong Kong shares have fallen 31%.

China’s Tencent is backing the developers of blockbuster videogames such as “Pokémon Unite” and “League of Legends.” But Beijing’s crackdown on the industry at home, including when minors can play online games, could affect the company’s global videogame empire. Photo composite: Sharon Shi The Wall Street Journal Interactive Edition

Write to Liza Lin at Liza.Lin@wsj.com