The short answer is yes, you can write your spouse and children out of your will, but there is of course a "but." Multiple times recently I have found myself explaining to clients and friends just what "testamentary freedom" means in Iowa. As a general rule in the United States, we are free to choose who gets what property when we leave the world behind. I will spare us all the history lesson, but historically this was not the case and many countries still limit the ability to completely disinherit a surviving spouse or children. Iowa still has protections in place for those individuals also.
Children have no "right" to inherit from their parents, but there are certain assumptions in place that protect the children. For instance, children born or adopted after the execution of a will (referred to as "pretermitted heirs") typically receive a share of the estate. Some wills specifically provide for this by defining the term "children" in the will to include any children born to or adopted by the testator after the date of the will. Including such a statement saves a couple from needing to change their wills every time a child is born. Even if the will does not address it, Iowa law provides a share to children born after the date of the will unless it appears the omission was intentional. (Iowa Code Section 633.267). Also, children and grandchildren are among the classes of beneficiaries who are not charged inheritance tax in Iowa. Does inheritance tax really stop someone from disinheriting a distant child? Probably not, but if a parent is indifferent between leaving property to nieces and nephews or estranged children, the tax difference may be a factor.
Spouses in Iowa have more protection than children. While you can draft a will leaving nothing to your spouse, the surviving spouse has a right to an elective share, meaning he or she can "elect" to take approximately one-third of your property instead of the share given under the will. (Iowa Code 633.238). (The exception here is if the couple had a valid prenuptial agreement. If the couple is already married, it is too late for that, but that is a topic for another day.) The elective share is not discussed with most couples during estate planning because the surviving spouse often receives all or most of the assets, which is more than the one-third elective share. The biggest thing to remember about the elective share in Iowa is that the law is unclear as to whether retirement assets or life insurance can be reached by the one-third election. In some estates. that can make a huge difference.
After the long explanation, the conclusion is yes, you can write family members out of your will, but the will needs to be carefully drafted in light of these state law protections.