Indonesia set to ban premarital sex under new criminal code The legislative overhaul will also ban insulting the president or state institutions and expressing any views counter to Indonesia's state ideology. Cohabitation before marriage is also banned.