Andy Hicks, owner of HIX Inc., a small health care technology consulting business in Denver, travels frequently. And as a gay man, he said, he’s enjoyed acceptance in many destinations — even in Cuba, where he traveled this year with his partner. “We didn’t know what to expect,” Mr. Hicks said. “We had zero problems.”

The travel industry offers gay travelers everything from special cruises and tours to gay-friendly hotels. But there are still many places in the world, including many countries in the Middle East, Africa, Asia, the Caribbean and the Pacific, as well as Russia, where laws or social customs create an unwelcoming and unsafe environment for travelers who are lesbian, gay, bisexual or transgender. More than 75 countries consider consensual same-sex sexual relations a crime, and in about 10 countries a person could be put to death for being gay, according to the United States State Department.

“Today, it is important for a L.G.B.T. person to understand the laws and how they are enforced and the culture of the countries and even cities where they visit,” said Bruce McIndoe, chief executive of iJet International, a travel risk management company. In an environment of religious extremism, he said, “individuals are more likely to lash out or take unilateral action against assumed members of the L.G.B.T. community.” IJet, he said, has seen increased requests from clients to help prepare and protect their gay and transgender travelers after the mass shooting at an Orlando, Fla., nightclub last June and other episodes.