The following has worked for me.
(1) Provide a popular free public service on my site.
(2) Wait a few years.
(3) Observe that I never leave the front page of Google.
All this is with no messing around with keywords or paying
SEO cowboys or any of the various forms of cheating (eg getting one's mates to put up links) that only work until the next algorithm revamp in five minutes' time (if that).
(And in passing the Google advertising revenue pays the hosting costs several times over.)