From Wowpedia
Jump to: navigation, search

GetRealmName() and GetNormalizedRealmName() return the name of the character's realm in different formats.

realmName = GetRealmName()
normalizedRealmName = GetNormalizedRealmName()


String - The name of the realm, unmodified.
String - The name of the realm, but without spaces or hyphens.


  • The normalized realm name is used for addressing whispers[1] and in-game mail.
  • GetNormalizedRealmName() may return nil at load time until PLAYER_LOGIN (i.e. found to not work during VARIABLES_LOADED upon initial login).


The following macro prints the name of your character's realm:

/run print("You are currently on realm: " .. GetRealmName())

Patch changes

This does not imply the function couldn't have existed sooner.

See also

  • UnitName - Returns a character name and the server (if different from the player's current server)


  1. ^ SDPhantom 2020-02-18. Re: Party members with server name?. WoWInterface.
  2. ^ 2016-10-25, UnitPopup.lua, version, near line 1576, archived at Townlong-Yak
  3. ^ SpaceDuck, Mule 2014-10-30. GetCVar("realmName") gives nil. MMO-Champion.
  4. ^ Meatpuppet 2005-07-02. Difference between revisions of "World of Warcraft API". WoWWiki.