Off Page and On Page both activities should have done to achieve the ranking in search engine. Do On page activities to make understand the crawlers and make user experience better. Off page activities to generate the backlinks through various activities to achieve the traffic and rank.