Shiraoi, like the rest of Hokkaido, was populated by the
Ainu. According to the town's official website, the name, Shiraoi, means "
rainbows" in the
Ainu language. In 1867, the Sendai domain established a fort in Shiraoi and work began on . The following year the
Boshin War caused Sendai to retreat from Shiraoi and return to Sendai proper. After the revolt was put down the government dismantled the fort in 1870. The end of the 19th century saw expansion of the town. A road was established connecting Shiraoi with
Muroran,
Sapporo, and
Hakodate in 1873. Nineteen years later, the first railroad station was established. The villages of Shadai and Shikiu were established. Two significant events occurred during this expansion: in 1874,
Mount Tarumae erupted, and in 1881, the
Emperor Meiji visited. ==Geography==