Here is one alternative to look at. Pennsylvania Senate Bill 538 (from 2013). Read underlined on the second page.
That's basically the same proposal as I posted back in 1546. Strangely there was no comment when I did it.
Wonder why.
>> ... It is the states that have the power to restore the Electoral College to its original intent—and to ensure that it better represents the will of the American people. To do so, they must commit themselves to this majority-rule principle: No candidate receives all of a state’s electoral votes unless the candidate gets a majority of the state’s popular votes.
There are many methods states can use to comply with this principle. They could have a regular runoff between the top-two candidates, held in late November, if no candidate received a majority in the initial popular vote. Alternatively, states could hold a preliminary vote—perhaps on the Tuesday after Labor Day—to clear the field of third-party and independent candidates, so that only the top two finalists appear on the November ballot. (This option would function similarly to the “top two” system that California and Washington state currently use for nonpresidential elections.) Or, states could adopt the kind of “instant runoff voting” procedure that Maine recently employed successfully for its congressional elections: Voters can rank their preferences among multiple candidates, so that a computer can tally which of the top two finalists receives a majority once all lower-ranked candidates are eliminated.
Another idea: A state could award all of its electoral votes to a candidate who receives a majority of the state’s popular vote, but if no candidate does, then the state would apportion its electoral votes among the candidates. For example, in the instance of a 38-37-25 percent split among three candidates in a state’s popular vote, a state with 10 electoral votes might split them 4-4-2.
... This commitment to majority rule, moreover, is actually fairer to third-party and independent candidates than the current system, because it gives them a chance to break through without risk of affecting the outcome if they don’t. When voters don’t have to worry about how a third-party candidate might skew the election, they might feel more emboldened to vote for that candidate, and the candidate has a better opportunity to make his or her case. <<