What should be illegal is any profitable situation resulting from sex outside of marriage.
Welfare, free schooling for illegitimate children, child support, etc.
People should be free to sin. And everyone else should be free from having to pay for their consequences.
There we go.
You get more of what you subsidize; so stop subsidizing bastardy.