No, your spouse does not have to be named as your beneficiary on your life insurance policy.

As the owner of your life insurance policy you can choose anyone you wish to be the beneficiary, including but not limited to your children, although if they are minors, it is better to leave the money to a trust or another trusted adult who you know would use the death benefit for their welfare.

You can choose anyone or any entity to be your beneficiary who has some financial input in your life. For example, you may wish to choose as beneficiary your parents who gave you some money, a business through which you have a loan, grandparents you care for in their home or yours, or any family or friends.

Here's hw you can learn more about beneficiaries to life insurance policies.