Adam Groffman’s passion for travel has taken him to nearly every corner of the globe.

Yet, as a gay man, there are places he won’t go: Russia, Dubai and, now, Brunei. “If I don’t want to go somewhere, I’m not going to,” Groffman, 34, said. “Travel is such an amazing thing to be able to do. There’s little point to stressing yourself out on a holiday.”

“ A 27-year-old Scottish man was initially sentenced to three months in jail in Dubai after touching another man’s hip while walking through a crowded bar. ”

For Groffman, a travel blogger, and other LGBTQ travelers, it has perhaps never been safer to travel and be open about one’s sexual orientation or gender identity.

Nevertheless, traveling to many parts of the world still poses a major risk to one’s safety when you are lesbian, gay, bisexual, transgender, queer or questioning.

Brunei has come under scrutiny this week after the small country located in Southeast Asia enacted an Islamic law that made gay sex punishable by flogging or stoning to death. Celebrities including actor George Clooney and talk-show host Ellen DeGeneres have called for tourists and corporations alike to boycott nine hotels, including the Beverly Hills Hotel in Los Angeles, owned by Brunei’s sultan and prime minister, Hassanal Bolkiah.

Since then, eight of the hotels have deleted some or all of their social media accounts, while another has made its profiles private. Travel agencies and airlines have also ended partnerships with the state-owned Royal Brunei Airlines. TripAdvisor TRIP, -4.25% has banned reviews of the hotels in the wake of the backlash.

While Brunei is not the only place where experts say it’s not safe to be a member of the LGBTQ community. “Brunei made such a splash because it’s so barbaric and medieval,” said Ed Salvato, editor-in-chief of travel website ManAboutWorld and an LGBTQ travel expert. “But multiple countries have the death penalty on the books as a penalty for LGBT people.”

Brunei is far from the only country with anti-LGBTQ laws in place

Homosexual activity is illegal to some extent in 71 countries, according to Equaldex, a crowdsourced site that tracks legal protections afforded to the LGBTQ community. Enforcement of these laws varies. In some countries, only homosexual activities between men is illegal. Other countries have laws criminalizing homosexuality on the books, but do not enforce them.

Read more:This is the biggest financial concern among LGBTQ Americans

Brunei isn’t the only country where the punishment for homosexuality is death — Saudi Arabia, Afghanistan, Iran and Mauritania also allow for the death penalty in these instances. They’re obviously not on people’s list of summer travel destinations, but even countries where homosexuality is legal, discrimination against LGBTQ people may not be illegal.

“ ‘Brazil has broad protections, but they still have the highest transgender murder rate in the world.’ ” — —Ed Salvato, editor-in-chief of travel website ManAboutWorld

“When you look at the protections on the map, Brazil has broad protections, but they still have the highest transgender murder rate in the world,” Salvato said. “The homophobia and transphobia you find out in the world is different depending on where you are.”

Russia, for instance, famously passed a law that banned “propaganda of nontraditional sexual relations,” despite the fact that homosexuality is legal there.

Other places have faced travel boycotts in the wake of anti-LGBTQ laws. Some called for a boycott of Bermuda after the island territory introduced a ban on same-sex marriages. And North Carolina faced corporate backlash in which many companies said they would limit travel to the state after its lawmakers passed a controversial “bathroom bill” that required transgender people to use restrooms corresponding to the sex on their original birth certificates.

And anti-LGBTQ laws and sentiment are not dwindling.

The gay-dating app Scruff began issuing gay travel advisories to users five years ago after the company’s management noticed how frequently people were using the app to research potential travel destinations, Scruff CEO Eric Silverberg said. These advisories alert users to local laws pertaining to homosexual activities.

Also see:How LGBTQ Americans have fared since Trump’s election

“Part of our mission here is to keep our members safe and informed when they travel, but also increase global pressure for reform,” Silverberg said.

But since launching the feature, Scruff has only added more safety advisories. “We haven’t been able to take as many countries off of it as we may have hoped,” he said.

Traveling while gay is ‘safer now than it ever was’

Despite the draconian laws and widespread anti-LGBTQ sentiment that exists in many parts of the world, LGBTQ travel has exploded in popularity.

Over three-quarters (77%) of LGBTQ people have a valid passport, according to a report from Community Marketing & Insights, an LGBTQ market research firm. Comparatively, only 42% of all Americans have a passport, based on statistics from the U.S. State Department.

“Travel is part of the DNA of LGBT people — they have always traveled to find people like themselves,” Salvato said.

“ ‘The homophobia and transphobia you find out in the world is different depending on where you are.’ ” — —Ed Salvato, editor-in-chief of travel website ManAboutWorld

In the past, LGBTQ travel mainly focused on specific resorts or towns that became LGBTQ Meccas — think Provincetown, Mass., Fire Island, N.Y. or Key West, Fla. — LGBTQ people are now traveling just about everywhere. And that includes places where homosexuality may not be legal or acceptable by the general public.

“When we’re talking about persecution of LGBTQ people, it’s usually locals we’re talking about,” Salvato said. “Overall, given how unwelcome gay people were throughout history, it’s safer now than it ever was.”

Indeed, high-profile arrests or punishments of LGBTQ people in places like Chechnya or Tanzania have generally involved local residents and not travelers.

But that’s not always the case: A 27-year-old Scottish man was initially sentenced to three months in jail in Dubai after being charged with public indecency for touching another man’s hip while walking through a crowded bar. The United Arab Emirates’ ruler, Sheikh Mohammed bin Rashid al Maktoum, later ordered that the charges be dropped.

Gay travel blogger Adam Groffman was able to find a gay bar in Amman, Jordan, thanks to a suggestion from someone he met through a dating app. Courtesy of Adam Groffman

LGBTQ people need to act wisely when traveling abroad

In many places where being LGBTQ is illegal or stigmatized, traveling safely means being hyper-aware at all times.

For instance, the State Department advises caution when using dating apps overseas. In some countries, such as Egypt, police have allegedly used these apps to identify and subsequently harass or detain people who were looking to engage in homosexual activity.

“ ‘I didn’t necessarily feel unsafe or uncomfortable, but I wasn’t necessarily out.’ ” — —Travel blogger Adam Groffman on traveling in the Middle East as a gay man

Nevertheless, these apps can also be an extremely useful resource for LGBTQ people. “Gay dating apps are the unsung hero of planning travel,” Silverberg said.

Many people will turn to these apps to connect with locals and glean need-to-know information on how to move about these locations safely and where to find safe spaces. “Our community supports itself and supports each other,” Silverberg said.

Groffman has traveled to parts of the world where being gay might be risky, including Egypt and Jordan. “When I was in Jordan, I didn’t necessarily feel unsafe or uncomfortable, but I wasn’t necessarily out,” he said. “I would take taxis and they would ask about a wife or a girlfriend, and I wouldn’t come out to them.”

In those countries, connecting with people on these apps gave him the opportunity to express himself freely. It was a suggestion made by someone he met through a dating app that led him to find a gay bar in Amman, Jordan. “It was something that I didn’t necessarily expect to find there, but I felt totally safe and comfortable,” he said.

While homosexuality is legal in Jordan and it’s considered a progressive country compared to other places in the Middle East, it’s still a very socially conservative place, experts say. Public displays of affection between same-sex couples could also be regarded as disrupting the public peace.

Jordanian authorities have cited other justifications for harassing or jailing LGBTQ people, according to the non-governmental organization Human Rights Watch. For instance, 10 gay and lesbian people were arrested in 2014 for holding a party in Amman.

How to stay safe as an LGBTQ traveler

Given the popularity of international travel within the LGBTQ community, a number of resources have been developed to keep travelers safe. The U.S. State Department has a guide for LGBTQ travelers with a range of tips. And last year insurance firm AIG developed a travel guide with ManAboutWorld.

Here are some tips on how to stay safe:

• Know the local laws. As a foreigner, U.S. citizenship or the laws from home won’t apply overseas. It’s important to follow local ordinances in order to avoid being arrested.

• Understand the culture. In other countries, public displays of affection may be frowned upon. Even in countries where homosexuality is not criminalized, this could lead to harassment.

• Trust your instincts. Especially when it comes to being out about your sexual orientation or gender identity, go with your gut and only reveal personal information to people you trust.

• Let people know your whereabouts. If you’re meeting up with a local or traveling somewhere risky, it’s a good idea to keep friends and family abreast of your movements.

• Touch base with your local embassy. People traveling abroad should also consider letting their local embassy or consulate know they will be traveling to that country in case of an emergency.