Renting a property in Spain for a month or six months is not a problem. It's a common and well-established practice, especially in tourist-heavy areas (such as the Costa del Sol and the Canary Islands). Such contracts are classified as temporary rentals and are not subject to the five-year extension rule. For example, in Alicante and Málaga, landlords are willing to rent for six to eleven months.
To rent a property in Spain long-term, keep in mind that a permanent residence agreement (arrendamiento de vivienda) allows the tenant to extend the lease for up to five years. The deposit is equivalent to one to two months' rent and is registered with a regional authority, such as the Instituto de la Vivienda in Madrid.
In this case, the landlord is obliged to give notice of termination of the contract 2 months in advance, and the tenant - 1 month in advance.
Tenants do not pay taxes on rent if the property is used for personal residence. Landlords are required to declare rental income and pay IRPF tax (19% for EU residents, 24% for non-residents).
To successfully rent a property in Spain, request a nota simple from the property registry (Registro de la Propiedad) and ensure the property is not under foreclosure. Check reviews and ask for references, especially when renting directly from an agent.