The internet was built on the premise of allowing people to engage in free speech and exchange ideas, even dangerous ones.

That ethos now faces a stern test following the violence and terror attack in Charlottesville, creating a host of ethical questions for businesses including Facebook, PayPal and Spotify. Many are deciding to ban white supremacist and neo-Nazi users from sending money, posting comments and listening to "white power" music. Discord, a group chat app, kicked off alt-right communities on Monday, according to The New York Times.

While those decisions are applauded by many, others are questioning whether tech companies are going too far by deciding what music their customers can listen to or what comments are acceptable. The dilemma was spelled out by Cloudflare CEO Matthew Prince, who wrote in a blog post about how he decided to cancel the account of the Daily Stormer. The issue came to a head for Cloudflare, an internet security company, when the neo-Nazi publication claimed "we were secretly supporters of their ideology," he noted.

Get Breaking News Delivered to Your Inbox

That was a "tipping point" for his company, Prince noted.

"Someone on our team asked after I announced we were going to terminate the Daily Stormer: 'Is this the day the Internet dies?'" he wrote. "He was half joking, but only half. He's no fan of the Daily Stormer or sites like it. But he does realize the risks of a company like Cloudflare getting into content policing."

During the past decade, American businesses have increasingly espoused ideals such as diversity and inclusivity. The Charlottesville attack is pushing employees and customers to ask those corporations whether they are going to live up to their slogans and corporate policies, said Brian Kropp, HR practice leader at consulting firm Gartner.

"You don't know what the values of your company are until they are tested, and now they are being tested," he said. "Whatever you say you stand for in an organization, you have to stand up for it when the moment comes. If you do that, odds are things will work out."

PayPal (PYPL) cut off business with more than three dozen hate groups and other extremist organizations following the white nationalist rally in Charlottesville. Among those are Altright.com, a white nationalist group led by Richard Spencer.

"Regardless of the individual or organization in question, we work to ensure that our services are not used to accept payments or donations for activities that promote hate, violence or racial intolerance," PayPal said in a statement.

Facebook (FB) banned the Facebook and Instagram accounts of a white nationalist who attended the Charlottesville rally. Facebook CEO Mark Zuckerberg wrote in a post, "Debate is part of a healthy society. But when someone tries to silence others or attacks them based on who they are or what they believe, that hurts us all and is unacceptable."

At the same time, some customers are pushing back, asking in social media posts whether the organizations will hold other groups to the same standards. Others are expressing concern that it might backfire.

"I think this leads to more Nazis," one user wrote in response to Cloudflare's decision. "Instead of laughing at them, they feel persecuted and silenced. Which reinforces their beliefs."

While some users claim their free speech is being violated, private companies have the right to set their terms of service, just as they have the right to discipline employees for code of conduct violations. The latter was an issue that arose when Google fired engineer James Damore after he published a manifesto that argued the gender gap in technology is due to biological factors, such as women's higher "neuroticism" than men.

"People confuse the fact that the government is not allowed to restrict free speech, but private companies are," said Michael Niborski, a partner at law firm Pryor Cashman who specializes in free speech issues. "It's a cost-benefit analysis by the company: Are we going to lose customers? Are we going to get bad publicity because we are giving them a platform or a website and allowing them to display their music?"

He added, "One thing that makes this particularly unique is you are talking about one of the most vilified, negative groups in history, and so companies feel protected in taking their music down."

In essence, Silicon Valley is confronting the "paradox of tolerance," the idea outlined by philosopher Karl Popper that a tolerant society must be intolerant of intolerance. Otherwise, the intolerant will have the freedom to destroy tolerance.

Employees increasingly are important constituents in businesses' decisions to stand up against bigotry and white supremacy, Gartner's Kropp said. A generation ago, workers didn't identity as much with their employers' values, but employees now see their workplaces as extensions of their own core beliefs.

"If you are banning some of these things, it's a fairly small minority of people who are fairly outraged about it," he said. But without speaking out against intolerance, "especially in the tech space where it's super competitive, you run a huge risk of losing a chunk of your employee base to the competition."

But banning white supremacists can be good for business, even if some customers question corporate control over free speech.

For instance, dating site OKCupid banned white supremacist Chris Cantwell for life, 10 minutes after they received the alert he had a profile on their site. Customers praised the decision, with one women writing, "Single women all over the world thank you!!!"

"There is no room for hate in a place where you're looking for love," OKCupid said on Twitter.