Best database design for website ranking
Will you be ranking the billions of web sites?  If so, then on-the-fly and recompute-all are out of the question.

Instead, have a background task working on the problem.  For display, show the info that is in the table, possibly out of date by a day or two (depending on how long it takes to recalc).

Put the ranking in a separate table, with only website_id and rank.  This will make replacing the entire table after the recalc atomic and fast.  Perhaps a second table with website_id, country_code (CHAR(2) CHARACTER SET ascii), and rank.

You have not explained how the ranking is calculated, so I can't give you any insight in how to do it as a background task.