The series had been set for Monday to Wednesday at Tropicana Field in St. Petersburg, but the powerful hurricane is on track to cross through Florida over the weekend and is expected to continue affecting the state throughout the early part of next week and possibly longer.
Yankees manager Joe Girardi had suggested Chicago as a potential site, but the Rays chose to play in New York, a source told ESPN's Andrew Marchand.
Rays manager Kevin Cash said he doesn't mind that New York's Citi Field was chosen as the neutral site for the series against the Yankees.
"I'm fine with [Citi Field]," Cash said. "Look, we've got to suck it up on our end, deal with it. It's not the most important thing. Wherever we need to play, we'll go play and hope for the best back home."
According to a source, Seattle was also considered as a location for the Rays-Yankees series. Hotel availability was an issue there, as it was with Chicago.
Tampa Bay will continue to serve as the home team for the series.
The Rays allowed players and staff members to bring their families on their current road trip, and the team delayed its flight to Boston until Thursday night in order to give traveling personnel time to get their homes and other affairs in order.
Cash, a native of Tampa, admitted his thoughts have drifted from baseball over the past few days as Florida braces for Irma.
"I've watched Weather.com more than I have any advanced report on the Red Sox or anything like that," Cash said. "There's a lot of concern. It's going to be very eerie on Sunday if it's projected to hit at that point, that we're in the middle of playing a ballgame [at Fenway Park]. We'll find a way to deal with it, but I think a lot of our thoughts will be back at home with our community.
"There's a lot of what-ifs. Just hoping for the best. We're pretty confident we're all going to get affected by it by some magnitude. Just hoping it's able to be withstood."
The Red Sox, who are scheduled to travel to Tampa Bay next weekend, haven't been informed if their series will be relocated. With the Mets out of town through Sept. 20, Citi Field could be a potential site for that Red Sox-Rays series, too.
With 15 major league teams holding spring training in Florida, Irma's impact on baseball is far-reaching. JetBlue Park, the Red Sox's spring-training ballpark, will be used as a headquarters for first responders in Fort Myers. The Sox have evacuated players and staff from their Florida facility to Boston.
Asked if the Rays should play at all next week if Tampa Bay is impacted by the storm, Cash admitted he isn't sure.
"I don't know. That's a tough question," Cash said. "We're not quite there yet, but you're seeing what this storm is causing for a lot of homes, a lot of businesses, a lot of people. I don't know if I've got a good answer. We're going to do what Major League Baseball feels is best."
ESPN's Scott Lauber contributed to this report.