You need to know several things when purchasing a home.
First: At the present time in my area and many areas (Greater Philadelphia Area) it's waaaaaaaaaaaaaaaaaay better to buy than rent. So for example if you buy a 300,000 house with 20% down and carry a 240K mortgage @ 3.92% your mortgage will be $1,135,00 per month. At 6K in real estate taxes and 2K in home owners insurance your monthly payments would total around $1,800.00 Now what size place could you rent for $1,800.00 a month? Also factor in your net tax bracket of about 20% and the mortgage /real estate deduction nets you another over 3K per year( $266 per month). Unless your area has a glut of rental properties, it almost always better to buy unless this is a short term purchase in a falling market.
Second: In Real Estate remember the three most important things are location, location and location. I live 4.5 miles from work. What will your commuting costs be? How have property values been in the area you are looking at? What are the quality of the public schools in the area you desire. This feeds into the resale value.
Third: Get a home inspector that you trust. This is key. You don't want to move in and find out you need a new roof, or an electrical upgrade or a foundation repair or a new heater or A/C unit.
Fourth: Work with your own realtor. The Realtor that is selling the house works for the seller. You need somebody working for you that knows the market and the value of houses in the area you are looking at.
Fifth: Be prepared to take on the labor and expense for home ownership: Shoveling the snow, raking the leaves, mowing the lawn, etc. It takes time or money.
Sixth: Factor in any upgrades you want to do. From minor thinks like painting to major items like a new kitchen or bathroom.
Seventh: Now you need to make sure you have disability insurance. You are more likely to be disabled than die so you need to be able to protect your investment. If you are married you also need life insurance for both income producers.
Eighth: There are no
RULES. There are guidelines
Generally accepted percentage of income for housing. Once you read the articles in the link you can decide what works best for you.
Ninth: Make sure you are prepared for all the expenses of home ownership that don't usually amount to anything at an apartment like utilities, home owners insurance, real estate taxes, etc.
Tenth: Have a good solid realistic budget that you can live with. Don't lie to yourself when you make the budget.
I was lucky. I bought my house at the low point in the market. I was able to leverage my house to buy a vacation home and pay for my kids college so they got out debt free. I still have mortgage payments but it was a value judgement I made for me. You have to make your own for you.