Raisi made the comments in a meeting with the Jalilian Family in Abadan that lost four members in the collapse.
The president demanded officials keep close tabs on unsafe buildings and not let people reside in them.
He said all such buildings must be evacuated immediately.
Raisi arrived in Abadan on Friday morning on a surprise visit. Upon his arrival, he went to the site of the building collapse and inspected the process of debris removal there.
The collapse happened 11 days ago. Dozens of people have died in the incident.
People have held protests in the city following the incident and demanded those responsible for the building collapse be brought to justice including the owner of the building Hossein Abdolbaghi.
But officials say Abdolbaghi got killed under rubble when the building tumbled down. Authorities blame the incident on poor safety standards.