Are hot baths okay to take while pregnant?¿ 😬

So I have struggled with insomnia for as long as I can remember.. and what helps me sleep is taking a hot bath about 30 minutes before I go to bed. So I'm currently 8 weeks pregnant and I read somewhere that taking hot baths are not good for pregnant women.. is this true?