Facebook’s move is perhaps the strongest anti-ad-blocking measure taken by a major technology company, especially one that serves advertising to more than 1.7 billion monthly users globally. The effort is risky for the company, which prides itself on delivering the best user experience, because it could alienate some people for whom ad blocking is an ideological stance on how they wish to gain access to the internet.

To shut down the blockers, Facebook is taking aim at the signifiers in digital ads that blockers use to detect whether something is an ad. Facebook’s desktop sitewide changes will then make ad content indistinguishable from non-advertising content. For blockers to get around these changes, Facebook said they would have to begin analyzing the content of the ads themselves, a costly and laborious process.

Still, Facebook will continue to let people have some control over the ads they do and do not see. On Tuesday, the company also introduced an overhauled version of its ad preferences tool, which lets people opt out of seeing certain types of ads on the site. That will help Facebook serve more relevant ads, rather than bombard people with ads they do not want.

“We want people to help us do a better job with ads, rather than to fundamentally alter the way the service is rendered,” Mr. Bosworth said.

The move against ad blockers on the desktop site will not affect blockers used to access Facebook on a mobile web browser, the company said. It will also not apply to Facebook’s mobile apps, which already include advertising that cannot be blocked by outside programs. Facebook did not announce plans to expand the changes to mobile browsers in the future.

Executives in the ad-blocking industry denounced Facebook’s decision, calling it a misguided waste of time that would harm the social network’s members.

“It takes a dark path against user choice,” Ben Williams, communications and operations manager at Eyeo G.m.b.H., the company behind AdBlock Plus, wrote in a blog post after Facebook announced the change.