A mortgage secured by your main home to purchase land would be deductible as long as it meets the same requirements any other mortgage must meet. However, if the mortgage is secured by the land and potential construction of your main or second home, then it must follow the rules outlined below.
Per IRS Publication 936 Home Mortgage Interest Deduction, page 4:
For you to take a home mortgage interest deduction, your debt must be secured by a qualified home. This means your main home or your second home. A home includes a house, condominium, cooperative, mobile home, house trailer, boat, or similar property that has sleeping, cooking, and toilet facilities.
The interest you pay on a mortgage on a home other than your main or second home may be deductible if the proceeds of the loan were used for business, investment, or other deductible purposes. Otherwise, it is considered personal interest and isn't deductible.
Home under construction. You can treat a home under construction as a qualified home for a period of up to 24 months, but only if it becomes your qualified home at the time it is ready for occupancy.
The 24-month period can start any time on or after the day construction begins.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.