To qualify for buying the property as a main residence (prima casa) you must apply for residency at the property within 18 months of signing the purchase contract and you must spend at least 6 months of the year living at the address.
Otherwise the property will be classed as second home.