New user data from Redfin reveals that a record share of users were looking to move from one city to another in July, many in search of cheaper housing.

Home prices and mortgage rates have gone up so much that people are now increasingly looking to move to more affordable areas, according to a new report from the real-estate brokerage site.

With the average interest rate for a 30-year fixed-rate mortgage back up above 5%, there’s been a surge in people hoping to relocate, the Redfin report found. 33.7% of Redfin users were looking to move from one city to another, up from 32.6% in the second quarter. Before the pandemic, only about a quarter of users were looking to move.

Redfin RDFN, -8.03% has tracked migration data since 2017 and the 33.7% looking to move in July represented an all-time high. The report was based on on “a sample of about two million Redfin.com users who searched for homes across more than 100 metro areas in July, excluding searches unlikely to precede an actual relocation or home purchase,” according to Redfin.

Thanks to remote work still being an option for many employees, prospective buyers are using that freedom to explore moving to more affordable areas. More homebuyers were looking to leave the San Francisco Bay Area, Los Angeles, and New York City in July than any other area, Redfin said, a pattern that was “unchanged from the first half of this year.” 

The top potential destination that emerged in July, based on Redfin’s analysis of its data, was in the Sunshine State: Miami, Fla. 

But “migration into the South Florida metro is starting to slow,” the report added, “with fewer homebuyers looking to move to Miami than a year earlier.” 

Sacramento, Calif., took the No. 2 spot on the list for those hoping to relocate, but the pace is slowing, Redfin said, comparing traffic to a year ago.

The third spot was captured by San Diego, Calif., which knocked out the pandemic favorite, Phoenix. “Migration into San Diego has more than doubled from a year ago,” Redfin said. Los Angelenos were the most eager to move to nearby San Diego. Out-of-staters looking to move to San Diego were most likely to come from Seattle.

San Diego has a “better work-life balance and a beachside lifestyle,” Jodie Lee, a San Diego Redfin agent, told the website, “and it has picked up since remote work became more commonplace.” 

She also noted that the city has a big military presence, so service members are increasingly relocating to the area because they have a “better chance of getting an offer with a VA loan accepted” in this cooling market.

Phoenix was sixth on this list of places people were hoping to relocate to. Redfin noted a “sizable decline in out-of-town homebuyers” looking to move to the city. Higher-than-average home prices are partly to blame: The median home in Phoenix was $485,000 in June, Redfin said, which was above the national median of $428,000.

The list included one city that has never before been in the top 10: Portland, Maine. The city is “especially popular with Bostonians,” Redfin said, “both those relocating and those purchasing vacation homes.” 

Here’s the top 10 list, with the top origin destination for potential relocators included: 

Rank City Top origin  Top out-of-state origin
1 Miami, Fla.  New York, N.Y. New York, N.Y.
2 Sacramento, Calif. San Francisco, Calif. Reno, Nev.
3 San Diego, Calif. Los Angeles, Calif. Seattle, Wash.
4 Tampa, Fla.  Orlando, Fla.  New York, N.Y.
5 Las Vegas, Nev. Los Angeles, Calif.  Los Angeles, Calif. 
6 Phoenix, Ariz. Los Angeles, Calif.  Los Angeles, Calif. 
7 North Port, Fla. Chicago, Ill. Chicago, Ill.
8 Cape Coral, Fla.  Chicago, Ill. Chicago, Ill.
9 Portland, Maine Boston, Mass. Boston, Mass. 
10 San Antonio, Tex. Austin, Tex. Los Angeles, Calif. 

Here’s where people are thinking about leaving the most:

Rank City Top destination  Top out-of-state destination
1 San Francisco, Calif. Sacramento, Calif. Seattle, Wash.
2 Los Angeles, Calif.  San Diego, Calif. Las Vegas, Nev.
3 New York, N.Y. Philadelphia, Pa. Philadelphia, Pa.
4 Washington, D.C. Salisbury, Md.  Salisbury, Md. 
5 Boston, Mass. Portland, Maine Portland, Maine
6 Seattle, Wash. Los Angeles, Calif.  Los Angeles, Calif. 
7 Detroit, Mich. Cleveland, Ohio Cleveland, Ohio
8 Minneapolis, Minn. Chicago, Ill. Chicago, Ill.
9 Chicago, Ill. Los Angeles, Calif.  Los Angeles, Calif. 
10 Denver, Colo. Chicago, Ill.  Chicago, Ill. 

Got thoughts on the housing market? Write to Aarthi Swaminathan at aarthi@marketwatch.com

Hear from Carl Icahn at the Best New Ideas in Money Festival on Sept. 21 and Sept. 22 in New York. The legendary trader will reveal his view on this year’s wild market ride.