From China Digital Space
帝都 (dì dū): imperial capital
Nickname for Beijing. Formerly, “imperial capital” was used in reference to the capitals of imperialist countries (zh), but as countries have ceased to proclaim themselves empires, the phrase “imperial capital” has become synonymous with a nation’s capital. Beijing’s nickname of “imperial capital” is often contrasted with an Internet nickname for Shanghai, 魔都 (mó dū), which means “devil/monster capital.”
The use of “imperial capital” to mean Beijing has increased as Internet users have come to rely more and more on code words, homonyms, and creatively indirect references to avoid and circumvent censorship. Words like grass-mud horse, river crab, and national treasure all originated in this way.
While such semantic wordplay originally served a purely pragmatic purpose, it has become an ingrained part of some forms of the written Chinese language, with even very common words sometimes replaced by close homonyms; for example, “what” 什么 (shénme) is sometimes replaced by “mystical horse” 神马 (shén mǎ). Instances of such wordplay seem innocuous, but are part of a larger practice that is semantically subversive.