Aloja () is a town in Limbaà ¾i Municipality in the Vidzeme region of Latvia, situated close to the border with Estonia.
Aloja as a settlement was first mentioned in written sources in 1449. Aloja saw rapid development after Latvian agrarian reforms in 1920. In 1925, Aloja was granted a status of a village, and it also became a centre of the parish. In 1936, the new Rëga- Rà «jiena railway line was constructed through Aloja. In 1992, Aloja was granted town rights. It was a part of Limbaà ¾i district until 2009. From 2009 until 2021, Aloja was the administrative center of the former Aloja Municipality.
Aloja is also the extra-territorial centre of the adjacent Aloja Parish, which until 2010 was the rural territory of the town of Aloja.