Are you thinking about buying a vacation home? You’re not alone. Consumers across the United States recognize that vacation homes can serve two purposes: They can, of course, provide a place for you, your family and your friends to relax. But they can also serve as a source of second income.

The owners of second homes are increasingly choosing to rent out their vacation properties as a way to generate a solid stream of passive revenue. The numbers from Airbnb, perhaps the most famous of all the home rental sites, proves this point: The company on its website says that it now has more than 3 million listings at any one time.

If you are interested in earning extra income, renting out a second or vacation home can be the smart choice. You can learn more about the rewards of buying and renting vacation properties by clicking here. We can provide you with the information you need to succeed.

But before you can even think about earning rental income from second homes, you will have to do some research on rents, housing stock and amenities in the communities that interest you. If you skip this step, you could lose money on your vacation home.

First, make sure to buy a home that is affordable enough so that the rental income you do make isn’t swallowed entirely by your monthly mortgage. Not every buyer of second homes takes out a mortgage. But those who do have to be especially cognizant of price, especially if one of their main goals with a vacation home is to earn extra money.

The National Association of Realtors says that the median price of a vacation home sold in 2016 stood at $200,000, according to a feature story by CNBC. That’s up 4.2 percent from the 2015. It also represents the highest this median price has stood since 2006.

This means that buyers must be careful when shopping for second homes. Yes, you want a home that you and your family and friends will enjoy. But you don’t want to spend so much that renting out your home is no longer a feasible way of earning a second income.

Next, pay close attention to the market in which you are buying. You might find an attractive vacation home with all the amenities and features you want. But if it’s located in a community that isn’t attractive to tourists, you’ll struggle to rent out the property for enough days to enjoy even a small stream of income.

Instead, look for a community that has the shops, restaurants, waterfront areas and attractions that bring in the tourists. These properties might be more expensive — again, be careful not to overspend — but you will have a far greater chance of renting out such homes for a greater number of weeks every year.

Finally, look carefully, too, at the average rents that vacation properties are selling for in the communities you are considering. If other owners are successfully charging higher rents, the odds are high that you will be able to do the same. And this will provide you with the best chance to succeed in the rental market.