When a man is in the closet about their sexuality, it is not uncommon to see signs that he has a softer side for gay men or a preference for males. It is also possible that they are avoiding sexual interactions because they feel they are insecure about their own sexual orientation. These ebbs and flows in a marriage are natural, but they can also be signs that he is hiding something from you.
One of the most common ways to know your husband is gay is if he has a history of homosexual porn on his computer or phone and does not want you to know about it. It is also worth checking his internet search history for a history of searches related to gay men, being gay, coming out, etc. A complete absence of internet activity should also be a red flag.
Another sign is if your spouse suddenly loses interest in physical intimacy. This can be caused by stress or conflict in the relationship, but it could also mean that he is gay and not interested in you. He may even make comments about you being oversexed or aggressive and not wanting to have sex.
This may be particularly difficult to understand if you have children together, but it can often be a sign that your spouse is gay. He may be afraid to come out to you because of the risk that he will be rejected and lose his job or family. This is especially true for men who live in extremely religious or anti-LGBTQ areas.