Well, you have to work according to the Google's point of view so when the site is ready then the on-page optimization should be done, but after doing on-page , you have to work on the off-page so that your site gets back links since back links shows the popularity of the site...
That's possible,
when you built your website with certain softwears,
you can have your keywords, and when you publish your website
google can find your website via these keywords