This would be a surprise for anyone in your situation, and I understand your reaction. It may not solve anything, but you could try to talk this out with your husband in a non-confrontational, calm manner, if possible, to hear his reasons for behaving in this way and what he thinks about his and your future.
I'd say the same. You need to know if he is cheating, first of all. If he has been having sex, you need to get checked at the doctor for STDs. You should obviously discuss if he is gay, bi, or just "gay curious," and especially, what that means about you and your marriage. Some women are married to gay or bi men, and the couple has worked out an accommodation to that. Some women have no interest in such a life. It will take some talking together to decide what you're both wanting now that you know, and he needs to be honest. It's more likely to happen if you are calm and concerned, not freaking out and wringing your hands. If you can do that.
Thank you for your comments. We have talked and he has assured me it won't happen again and that he isn't gay/bi. For me I can't quite get my head around that as why would he be on these sites. I don't feel angry and when I talk to him am very calm, considering the situation. He says he was curious and it was nice to feel the chase, I asked him why not women's chat rooms and he said he felt that would be cheating. No wonder I feel so confused. Now since all this is out I feel destroyed, I find myself questioning everything, if we don't have sex I wonder is it because of me, do I not fill his needs. It's is so nice to be able to get this all out and have unbiased advice. Thank you.