When Jeff Hanlon left Silicon Valley last year, he found the seemingly impossible: a town with a lively startup scene, stately houses and home prices far below those in the Bay Area and other urban technology hubs.

So Mr. Hanlon traded a 550-square-foot apartment in Mountain View, Calif., that he rented for $2,400 a month for a 4,000-square-foot house in a historic neighborhood of Richmond, Va. Purchased for $710,000 last year—a pittance by Silicon Valley standards—the 1902 home has five bedrooms, a formal dining room and an eat-in kitchen, where Mr. Hanlon and his husband, Rem Jurado, hosted extended family last Christmas.

“A house like this would have never been an option” in Silicon Valley, says Mr. Hanlon, director of customer care and education at IMVU, an online gaming company in Mountain View, where he still travels regularly. “I love that Richmond has a similar vibe to San Francisco and has little technology companies scattered throughout.”

Tech jobs are multiplying across America, attracting executives and entrepreneurs drawn to lower living costs and a slower pace of life. Places like Eugene, Ore., Manchester, N.H., and Huntsville, Ala., may have around 200,000 residents each, but they also have fledgling startup scenes, regional offices of large tech firms and major universities or research centers.

And all of them have home prices that are a fraction of those in Silicon Valley. In the San Jose area, the median sales price was $841,000 in the first nine months of this year, up 8% from the same period last year, according to data from Realtor.com, the website of the National Association of Realtors (the site is owned by News Corp. , which owns The Wall Street Journal).

In some places, the influx of tech money is causing house prices to rise. In Eugene, the median sales price of $239,000 in the nine months through September marked a 7% jump from the same period last year, according to Realtor.com.

For now, however, small tech hubs are a bargain for buyers. Here is a look at some alternatives.

Homes in High-Tech Cities Some tech executives are eschewing Silicon Valley and embracing places like Huntsville, Ala., Manchester, N.H. and Richmond, Va. The afternoon sun on Jeff Hanlon and Rem Jurado’s Georgian Revival home, built in 1902, in the Fan District of Richmond, Virginia. ALSTON THOMPSON for The Wall Street Journal 1 of 20 • • • • • 1 of 20 Show Caption The afternoon sun on Jeff Hanlon and Rem Jurado’s Georgian Revival home, built in 1902, in the Fan District of Richmond, Virginia. ALSTON THOMPSON for The Wall Street Journal

INSTEAD OF WASHINGTON, D.C., TRY RICHMOND, VA.

When Mr. Hanlon had a chance to move out of Silicon Valley, he first considered northern Virginia. But prices in the tech-heavy area around Washington, D.C., he found, weren't much better. So after searching real-estate website Redfin, he ventured south to Richmond, the state’s capital with about 220,000 residents. The first house he saw, in February of last year, was a historic brick home with white columns and a modern interior. Mr. Hanlon made an offer the following week and bought the house in March 2015.

Now he and Mr. Jurado, 26, enjoy the coffee shops in their neighborhood. Mr. Hanlon, 42, telecommutes to his Bay Area job. And lower wages and office rents allowed the pair to start their own business, a housecleaning franchise called MaidPro.

Last month, Washington, D.C.-based CoStar Group, an online marketplace for commercial real estate, said it plans to base its research center in Richmond, creating about 730 jobs there. Founder and CEO Andrew Florance said the firm chose Richmond for its educated workforce, office rents half of those in D.C. and more affordable housing.

The median house price in Richmond was $229,000 in the nine months through September, according to Realtor.com, compared with $392,000 in the Washington, D.C., metro area.

INSTEAD OF AUSTIN, TEXAS, TRY HUNTSVILLE, ALA.

Donovan Duncan bought this house in Gurley, Ala. for $400,000 in 2014. Photo: Art Meripol for The Wall Street Journal

Donovan Duncan, president of media at Curse, achieved an entrepreneur’s dream in August, when the Huntsville, Ala.-based, online gaming services company was bought by a unit of Amazon for an undisclosed amount. But Mr. Duncan, 33, is determined to stay put.

“The cost of living here is just incredible,” says Mr. Duncan. His house in Gurley, outside Huntsville, is a 2,600-square-foot home on a 30-acre lot that he bought for $400,000 in 2014. Mr. Duncan and his wife, Kaitlin, 27, are hobby farmers, raising pigs and chicken whose meat they sell, along with eggs, fruit and vegetables, to high-end restaurants.

Curse moved its headquarters to Huntsville from San Francisco in 2013. As employees grew older, Mr. Duncan recalls, they wanted families, children and bigger homes. “It was really hard to do that in San Francisco,” says Mr. Duncan, who has a 2-year-old son, Owen. One drawback: no nonstop flights to the West Coast.

Huntsville’s digital prowess emerged from the aerospace industries based there for decades. The city of roughly 194,000 is now planning to build a Google fiber network for fast internet service—a must for programmers working from home, said Lucia Cape, senior vice president of economic development at the local Chamber of Commerce.

Real Estate Newsletter Get the best of WSJ’s real estate news delivered to your inbox twice a week. Sign up for the newsletter.

In the nine months through September, the median sales price in Huntsville was $167,000, according to Realtor.com.

INSTEAD OF BOSTON, TRY MANCHESTER, N.H.

Manchester, a city of 110,000 people that is an hour’s drive from Boston, is replacing long-gone manufacturing jobs by reinventing itself as a tech center. With a quaint, New England vibe and no sales or income tax, the city added 2,000 technology jobs in the last two years, which increases the number of tech jobs to 7,200, according to Matt Cookson, executive director of the nonprofit New Hampshire High Tech Council.

Among Manchester’s best known companies is the internet-performance management company Dyn. Gray Chynoweth, a former Dyn executive who is now chief operating officer at digital-services firm SilverTech, says Manchester benefits from its proximity to Boston. Mr. Chynoweth, 38, travels weekly to Boston for work and recently took his older son, 5-year-old Graham, to his first baseball game at Fenway Park.

The Chynoweths live in a five-bedroom Colonial they bought for $280,000 when they got married in 2007. Built in 1890, the 2,100-square-foot house has a wraparound porch. Helped by the town’s low living costs, the family saved enough to buy a small house on nearby Lake Waukewan.

A drawback: harsh winters. In January 2016, the average temperature was 29 degrees—and this was one of the warmer years. In 2011, the city had 30 inches of snowfall.

In the first nine months of this year, the median house price in the Manchester-Nashua area was $241,000, a rise of 4% from the same period the previous year, according to Realtor.com.

INSTEAD OF SAN FRANCISCO, TRY EUGENE, ORE.

Todd and Celeste Edman’s ranch style home in Eugene, Ore. Photo: Boone Speed for The Wall Street Journal

Todd Edman, CEO of Waitrainer, a restaurant-software company, is what locals call a “returning salmon”—a native who left but returned to Eugene, a small city of 163,000, drawn to its growing tech sector, short commutes and quality of life.

The Eugene area has over 400 tech companies, ranging from startups to regional offices of companies like Symantec and Zynga. It has four daily flights to San Francisco and one to San Jose—but also a relaxed, small-town feel and much lower costs than those cities.

From 1998 until 2001, Mr. Edman lived in Livingston, N.J., and commuted an hour and 45 minutes each way to his job in New York. In Eugene, his commute takes 12 minutes. The 2,200-square-foot, four-bedroom house he bought for $300,000 in 2007 has a music studio and a backyard with a fire pit and a sandbox for the Edmans’ 4-year-old son, Steven, and their 2-year-old daughter, Lyra. Mr. Edman’s wife, Celeste, is CEO of software company Lunar Logic.

While median sales prices rose in the first nine months of 2016, to 239,000, median rents declined by nearly 2% in that period, to $1,100 a month, according to Realtor.com.

Write to Cecilie Rohwedder at cecilie.rohwedder@wsj.com