In the wake of recent violence in Charlottesville, Virginia, a swath of the tech sector has undergone a renaissance of sorts and announced that it was reducing or examining its ties to extremist groups.

CloudFlare CEO Matthew Prince said what a lot of executives were thinking when deciding to cancel service to the neo-Nazi site, the Daily Stormer. The site celebrated the death of a Charlottesville protester and sparked a tech-sector backlash against hate speech.

"My rationale for making this decision was simple: the people behind the Daily Stormer are assholes and I'd had enough," Prince said. "Let me be clear: this was an arbitrary decision."

In recent days, GoDaddy, Apple Pay, PayPal, and a Who's Who of tech companies like Google have decided that, to varying degrees, they will either stop doing business with some extremist groups promoting violence, or they will at least re-examine their financial ties to these groups.

While we've been reporting on the controversy, some Ars commenters have wondered whether it is legal for Internet companies to discriminate based on the viewpoint of a website.

The answer: yes.

"The current shape of the law doesn't prohibit the general discrimination based on general ideology," Eugene Volokh, a UCLA law professor and blogger at the Volokh Conspiracy, told Ars in a telephone interview. The Communications Decency Act, he added, grants the tech sector broad powers "to publish or not publish things."

At its most elementary level, anti-discrimination laws outside the employee-employer context don't prohibit private enterprise from refusing to do business with people based on a customer's political ideology. Nazis, white supremacists, and other political groups are not a protected class of people covered under state and federal accommodation laws. Combined, those laws generally outlaw discrimination based on one's race, color, religion, and sexual orientation.

Whether accommodation laws should be expanded to include more people or reduced to cover fewer people is a highly controversial topic that the US Supreme Court has agreed to decide. The justices are weighing a baker's refusal, on religious grounds, to make a cake to celebrate a same-sex marriage. Colorado regulators said Jack Phillips, the owner of Masterpiece Cakeshop in Lakewood, Colorado, broke a state anti-discrimination law when he refused to make a cake for the wedding reception of David Mullins and Charlie Craig.

In his brief (PDF) to the high court's justices, which are likely to hear the case in the coming months, the baker's attorneys said Colorado's law does not prohibit a baker from refusing a customer's request "to create a cake promoting white-supremacism for the Aryan Nation" or for "refusing to create cakes opposing same-sex marriage for a Christian patron." So it shouldn't apply to Phillips, he argues.

Among other things, the state ordered Phillips to "create custom wedding cakes celebrating same-sex marriages if he creates similar cakes for one-man-one-woman marriages." To comply, Phillips has stopped selling wedding cakes altogether.

Phillips' brief suggested that Mullins and Craig could get a cake elsewhere, a proposition that their lawyer blasted in their brief to the justices.

"It is no answer to say that Mullins and Craig could shop somewhere else for their wedding cake, just as it was no answer in 1966 to say that African-American customers could eat at another restaurant," the couple's legal team wrote (PDF) the justices.

For the Daily Stormer, it's doing just that: searching for a home on the 'Net to publish. Not finding a partner in the US, it jumped ship to Russia and then got nixed there over violating the country's laws against hate speech.

As of this writing Thursday, the Daily Stormer is only available via the Tor network—and only intermittently.