Generally speaking, Urban Exploration is not illegal in most circumstances. Offcourse, specific national and regional laws apply and certain locations have special protection. Each country deals with the issue according to its own laws and not always with the utmost clarity.
Please, be advice that I am not a layer and what I write here is a collection of legal information regarding Italy and Spain that can be found online. Be responsible, ignorance of the law does not exempt us from complying with it.
Urbex, or the activity of photographers and enthusiasts of exploring abandoned buildings, was born and developed on the edge of legality. If you follow some precautions, you are almost always ok. But it really takes very little to cross over into the illegal.
So, is Urbex Legal? Let’s make it clear in 8 points.
1. The State in which the property is located
And when I say state, I really mean the nation. There is a huge difference in legal consequences if the same action is done in Spain or Morocco. Be sure that you are aware of the rules and laws of the country you are in.
2. The state the property
This time I mean the conditions of the property. Broken windows, cracked walls, torn roofs, mold and uncontrolled vegetation, doors wide open, are all clear signs of abandonment that could protect the explorer.
If the "property is in a clear state of abandonment" could help to absolve of trespassing charges.
3. Make sure that the place is uninhabited
Make sure that the places to be explored are uninhabited and effectively abandoned.
4. Open accesses
Lack of fencing, wide open or non-existent doors, large openings in the perimeter walls... In short, all open gates are "friends of urbex". Everything changes if, to access an abandoned place, you try to open closed doors or climb over walls (the question would also change for every meter of height of the perimeters…), which constitutes trespassing on private property. Getting inside by force is sufficient for the accusation of "burglary".
5. Signs and warnings
Check always for any warning signs. Their absence or illegibility could avoid from liability.
6. Tools you carry with you
Be aware that any element that could be considered a weapon could create a legal issue.
7. Don't touch anything
For those who don't know it, the Urbex commandment "take only photos, leave only footprints" is also a legal protection. Any "souvenir" is ilegal. Avoid to leave fingerprints to avoid to be accused of attempted theft.
8. Don't run away and always cooperate with the authorities
If you have followed the advices mentioned above, you should be ok. It is always good practice to collaborate and clarify your intentions. By doing this you will be out of trouble in most of cases.