We introduce various spaces of functions of bounded mean oscillations (BMO) defined in a domain by taking into account the behavior of functions near the boundary. Then we establish several equivalences of these spaces. Moreover, we compare our space with a BMO space introduced by Miyachi. As an application we prove that the heat and the Stokes semigroup are analytic in such a type of spaces