Taylor Swift is lucky she didn’t wait till this year to release her hit album “1989.” To her fans, the title refers to her birth year. To Beijing, it’s a veiled reference to the Tiananmen Square massacre. Unless the U.S. stops it, China has found a way to bar anyone anywhere in the world—including Ms. Swift—from using certain Web addresses it finds politically offensive.

In October, Los Angeles-based XYZ.com, which operates several new Internet domains, made a deal with the Chinese government under which it will enforce Beijing’s...