People hold candles during a vigil in Hong Kong on June 4, 2018, to mark the 29th anniversary of the 1989 Tiananmen crackdown in Beijing.
People hold candles during a vigil in Hong Kong on June 4, 2018, to mark the 29th anniversary of the 1989 Tiananmen crackdown in Beijing.
PHOTO: ANTHONY WALLACE/AFP/AFP/Getty Images
Now playing
03:53
2019: China's year of sensitive anniversaries
WASHINGTON, DC - JUNE 22: Facebook
WASHINGTON, DC - JUNE 22: Facebook's Chief Operating Officer Sheryl Sandberg speaks with AEI president Arthur C. Brooks during a public conversation on Facebook's work on 'breakthrough innovations that seek to open up the world' at The American Enterprise Institute for Public Policy Research on June 22, 2016 in Washington, DC. (Photo by Allison Shelley/Getty Images)
PHOTO: Allison Shelley/Getty Images North America/Getty Images
Now playing
01:23
Hear Sandberg downplay Facebook's role in the Capitol riots
screengrab US social media
screengrab US social media
PHOTO: Getty Images
Now playing
04:35
Tech companies ban Trump, but not other problematic leaders
PHOTO: Samsung
Now playing
01:53
See Samsung's new Galaxy S21 lineup
PHOTO: CNN
Now playing
02:47
Extremists and conspiracy theorists search for new platforms online
This illustration picture shows the social media website from Parler displayed on a computer screen in Arlington, Virginia on July 2, 2020. - Amid rising turmoil in social media, recently formed social network Parler is gaining with prominent political conservatives who claim their voices are being silenced by Silicon Valley giants. Parler, founded in Nevada in 2018, bills itself as an alternative to "ideological suppression" at other social networks. (Photo by Olivier Douliery/AFP/Getty Images)
This illustration picture shows the social media website from Parler displayed on a computer screen in Arlington, Virginia on July 2, 2020. - Amid rising turmoil in social media, recently formed social network Parler is gaining with prominent political conservatives who claim their voices are being silenced by Silicon Valley giants. Parler, founded in Nevada in 2018, bills itself as an alternative to "ideological suppression" at other social networks. (Photo by Olivier Douliery/AFP/Getty Images)
PHOTO: Olivier Douliery/AFP/Getty Images
Now playing
03:49
Parler sues Amazon in response to being deplatformed
PHOTO: Twitter
Now playing
02:39
Twitter permanently suspends Donald Trump from platform
Panasonic
Panasonic's Augmented Reality Heads-up Display
PHOTO: Panasonic USA
Now playing
01:06
This tech gives drivers directions on the road in front of them
PHOTO: LG Display
Now playing
01:10
See LG's transparent TV
PHOTO: Twitter/@gregdoesthings
Now playing
02:06
Internet gets creative with empty iPhone boxes
NEW YORK, NY - JUNE 3: The Google logo adorns the outside of their NYC office Google Building 8510 at 85 10th Ave on June 3, 2019 in New York City. Shares of Google parent company Alphabet were down over six percent on Monday, following news reports that the U.S. Department of Justice is preparing to launch an anti-trust investigation aimed at Google. (Photo by Drew Angerer/Getty Images)
NEW YORK, NY - JUNE 3: The Google logo adorns the outside of their NYC office Google Building 8510 at 85 10th Ave on June 3, 2019 in New York City. Shares of Google parent company Alphabet were down over six percent on Monday, following news reports that the U.S. Department of Justice is preparing to launch an anti-trust investigation aimed at Google. (Photo by Drew Angerer/Getty Images)
PHOTO: Drew Angerer/Getty Images North America/Getty Images
Now playing
03:25
Google employee on unionizing: Google can't fire us all
Now playing
02:01
Watch 'deepfake' Queen deliver alternative Christmas speech
Now playing
01:42
Watch father leave daughter dozens of surprise Ring messages
PHOTO: Photo Illustration: Kena Betancur/Getty Images
Now playing
04:50
Zoom's founder says he 'let down' customers. Here's why
Now playing
00:48
See Walmart's self-driving delivery trucks in action
Now playing
01:25
This robotaxi from Amazon's Zoox has no reverse function

Editor’s Note: James Griffiths is a Senior Producer for CNN International and author of “The Great Firewall of China: How to Build and Control an Alternative Version of the Internet.”

(CNN Business) —  

Weibo can’t seem to get it right.

After apparently censoring a popular hashtag related to LGBT issues, the Chinese social network restored access Tuesday following a major backlash from users.

That backlash saw Weibo filled with rainbow flags, while related hashtags attracted millions of views and posts.

In many ways, it was a repeat of what happened last year, when Weibo launched a campaign to “clean up” the platform, including the removal of all gay-themed cartoons and videos — along with pornographic and violent material — to comply with Chinese laws and regulations.

The Twitter-like service, which boasts nearly 400 million active users, had to backtrack then too after an uproar from activists and ordinary users.

Both incidents show just how difficult it can be for even some of China’s largest internet companies to toe the government’s ever-moving line on what is permitted on the internet.

A spokesman for Weibo did not respond to CNN’s request for comment for this article.

Great Firewall

While there are some hard and fast rules for what content is banned in China — pornography, separatism, terrorism, for example — for the most part companies are expected to regulate themselves. There is no comprehensive blacklist of sensitive topics, so companies, and their legions of censors, must second-guess whether individual posts or discussions are to be allowed, based on their interpretation of public pronouncements and campaigns.

“Due to the lack of transparency in censorship decisions by the Chinese government and Chinese social media companies, we won’t be able to really know who was behind the censorship and then the reversal,” Yaqiu Wang, a researcher at Human Rights Watch and expert on Chinese media, told CNN.

She said that a vague clause in the recently passed Cybersecurity Law, on respecting “social morality,” may “have driven Weibo to censor LGBT content.”

The general lack of certainty about what they’re supposed to police often leads companies to err on the side of caution, fearing potentially ruinous punishments for failing to censor something they should have.

Last year, Quora-style question and answer service Zhiyu was removed from app stores for a week “due to lax supervision and the spread of illegal information,” according to a leaked censorship directive. Other companies have faced major fines and suspensions in the past.

But taking the initiative on censorship can also get companies in trouble, as Weibo has learned twice now. While the Chinese government has stepped up restrictions on the country’s LGBT community in recent months, there has been no official directive — yet — that anything to do with gay or lesbian issues should be censored.

This appears to have left Weibo stuck between its young, more liberal users, and the old, conservative men who run the Communist Party, unsure of who to please and running the risk of angering both.

Crackdown?

Weibo’s brief censorship of LGBT content is not the first sign that official attitudes may be hardening.

Homosexuality is not illegal in China and the authorities removed it from the official list of mental disorders in 2001. But in recent years, the Communist government under President Xi Jinping has taken an increasingly hardline stance on LGBT rights, banning portrayal of same-sex relationships on television and online.

In March, most mentions of homosexuality were removed from “Bohemian Rhapsody,” the award-winning biopic of British rock band Queen’s frontman Freddie Mercury, prior to its release in China. Among the clips that were removed were scenes of men kissing and the word “gay” for the Chinese audience.

According to the South China Morning Post, several LGBT organizations, including the Guangzhou Gender and Sexuality Education Centre, have been shut down in recent months.

Speaking to the Financial Times before the Weibo ban was rolled back, a spokesman for the Beijing LGBT Centre predicted that “China’s censorship of LGBT content will be ever more strict this year compared to last year.”

Wang, the HRW researcher, saw two reasons for the government’s apparent hostility to LGBT issues.

“The Communist Party wants to assert itself as the only moral authority in Chinese society and dictate … what is not for the public to consume, often in the name of national security and social stability,” she said.

The Chinese government considers independent civil society groups and organized protests as threats to its rule, Wang added.

“It certainly does not want to see China’s LGBT community becoming more empowered through online organizing.”

CNN’s Steven Jiang contributed reporting.