I would rephrase it as follows:
According to the host, it not only serves to prevent robberies, but also serves to prevent bad spirits from entering.
The sentence is similar to "She not only wrote the text but also selected the illustrations." Notice that not only is written between the subject and the verb.
As others said in comments, as well is not necessary, since the sentence is already using also; using both is probably like writing "She was not only intelligent but also very musical too."
As for using prohibit, the verb is used as "prohibit something," "prohibit somebody from doing something," "prohibit doing something, or "prohibit something/somebody from doing something." In your sentence, prohibit was used as "prohibit somebody" which is not how the verb is normally used.