A man wearing a respiratory protection mask walks toward an office building during smog in Beijing Thomson Reuters BEIJING (Reuters) - Near-record pollution levels in parts of China this week proved a two-edged sword for the country's e-commerce titans: orders poured in for anti-smog products, but transport restrictions meant it was a challenge to get these delivered.

Up to 50 million orders in north China alone face delivery delays due to grounded planes, closed highways and traffic bans, a spokeswoman for Alibaba Holding Group Ltd told Reuters, citing affiliate Cainiao Network Technology Co Ltd, which oversees China's largest logistics firms.

Online shoppers splurged on masks, filters and other anti-pollution gadgets, with e-commerce firms and brands reporting record demand in response to 'red alert' warnings in 24 cities by mid-week.

"In one day of red alert you'll probably do a month's sales," said Liam Bates, founder of Beijing-based Origins Technology Ltd, which makes air pollution monitors and air filters.

"But of course no one knows when the pollution will be really, really crazy, so it makes logistics a bit of a nightmare."

A consortium of delivery firms under Cainiao Logistics includes ZTO Express Inc, Shanghai YTO Express (Logistics) Co, Shanghai STO Express Co and Yunda Ltd - all of which posted delay warnings on their websites this week.

The red alert is the top warning in a four-tier system that triggers a series of regulations, including the closure of schools, factories and offices, and a blanket ban on up to half the vehicles in affected cities. The system was introduced in 2014 as part of a national effort to reconcile China's industrial engine with growing pressure from health groups.

The alerts in two dozen cities this week told citizens to stay indoors as air quality index (AQI) readings topped the maximum hazardous limit determined by the World Health Organization, and shrouded northeast China in thick smog.

A spokesman for JD.com, China's second-largest e-commerce platform, said orders peaked this week as consumers opted to stay at home. The number of pollution masks sold on the platform during the red alert more than trebled from last week, and sales of air filters rose 50 percent.

"Purchasing does happen in spikes around high pollution days", said Ben Cavender, a Shanghai-based retail analyst at China Market Research Group. "[Consumers] tend to make their actual purchases when they get the visual reminder of stepping outside and realizing they can't see."

According to Baidu, China's top search engine, searches including the term for 'smog' broke previous records on Monday.

Sold Out

It's the same consumer concern that has driven a surge in connected gadgets and consumables in the Chinese market, many of which see record sales during red alert events.

"The volume of people clicking our ads is about 30 times higher during smog periods," said a brand director at Beijing Public Technology Co, who gave only his family name of Liu.

He said the company, which makes ionic air cleaning devices for indoor use that can be worn as badges or necklaces, had to initiate an emergency stock transfer program after inventory was entirely sold out on Tuesday.

Some merchants said sales spikes on red alert days suggests people don't fully understand the year-round dangers of air pollution.

"There's still this issue in China that when there are alerts or the air gets really, really bad then everyone freaks out, but the other 90 percent of the time only a small percentage of people care," said Bates at Origins Technology.

As pollution levels eased slightly on Thursday, and some red alerts were canceled, some consumers took to social media to complain about the logistics delays.

"The face mask I ordered is delayed because of slow deliveries, and now the haze is vanishing," said one user on Weibo. "I guess I'll just save it for the next alert.

(Reporting by Cate Cadell; Editing by Ian Geoghegan)