The game will take place in Honolulu at Aloha Stadium, which served as the longtime home of the Pro Bowl until the exhibition game moved to Orlando, Florida, in 2016.
The Rams and Cowboys squared off in the divisional round of the playoffs last January. The Rams defeated the Cowboys 30-22 on their way to a Super Bowl LIII appearance.
The Rams and Cowboys also are scheduled to meet in the 2019 regular season.
A trip to Hawaii is the latest in a long list of preseason adventures for the Cowboys. Under owner and general manager Jerry Jones, the Cowboys also have played preseason games in London, Toronto, Tokyo, Mexico City and Monterrey.
Last season, the Rams traveled to Baltimore to hold joint practices with the Ravens before a preseason matchup.
ESPN's Todd Archer contributed to this report.