Both, On page techniques and Off page techniques both are important for SEO.