Wal-Mart will offer health insurance benefits to same-sex couples and domestic partners starting in 2014.

The nation's largest retailer, the second-largest employer behind only the federal government, said domestic partners of its U.S. employees will be eligible starting Jan. 1 in a postcard mailed to workers this week.

The change will cover same-sex couples, as well as domestic partners of opposite genders who have been living together and in a committed relationship for at least a year.

The move comes just months after the Supreme Court overturned the Defense of Marriage Act, which previously defined marriage as between a man and a woman. The ruling meant that married same-sex couples in a dozen states and the District of Columbia are now eligible for more than 1,000 spousal benefits previously off limits under DOMA.

Related: DOMA ruling's overlooked benefit: Immigration rights

Since Wal-Mart (WMT) operates in all 50 states, it was important to the retailer to develop a single definition for all workers and have consistency across the country, according to spokesman Randy Hargrove.

"Given the diverse world we're in, we wanted to have a comprehensive benefits packages that appeals to a contemporary workforce," he said. "We want to attract and retain the best workforce."

Hargrove said that about 1.1 million associates and their family members enroll in Wal-Mart's benefits programs. It's unclear how many people will enroll with the new changes.

Workers will be able to enroll from Oct. 12 through Nov. 1.