There is no doubt that every website owner wants to rank well in their respective niches, this has made google ranking a tedious battle especially with new website owners trying to compete with older websites. There are lots of factors that affect Search engine rankings but among these factors are two often confusing terms “robots.txt” and “no-index”.
Knowing what these two terms are and how to best use them to enhance your search engine ranking could help you out rank your competitor.
What is robots.txt?
A robots.txt file tells search engine crawlers which URLs the crawler can access on your website. This is used usually to avoid overloading your site with too many requests. Robots.txt file can be added to any kind of website like, wordpress, wix, magento, plain html site, shopify sites etc and its usually in the root directory of the website.
A sample of robots.txt file looks like this
User-agent: Googlebot Disallow: /nogooglebot/ User-agent: * Allow: / Sitemap: http://www.example.com/sitemap.xml *change “example.com” to your own domain
Why is robots.txt important?
Robots.txt is important and useful in many cases especially if you don’t want search engines to crawls certain pages or sections of your website. These sections could be ;
- Login pages
- A sub domain or certain directory on your website
- Certain files on your website like sensitive contents or media files (PDFs, images etc)
- A development or staging site which is still in development
Now that we know what robots.txt file is,
what then is no-index tag?
“No Index” is an instruction which prevents a page or other resources from appearing in searches. “no index” also acts as a way to instruct google to drop certain already indexed page or resource.
Why is “no-Index” Important to your website SEO?
To explain the importance of this, Imagine uploading sensitive business or organization finance meetings files (pdf, docx) which is supposed to be meant for only registered or logged in members only to google after a week and find those files showing up on google search. That’s the kind of disaster the no-index tag can prevent. No-index can unindex an already indexed file from a search engine.
You can add no-index tag to a file, to a web directory or to just a page. To add no-index to a file you simply add the tag rel=”noindex” to the file(s) you don’t want to have indexed. And to prevent a directory or page from getting indexed especially on google, you just add this <meta name=”robots” content=”noindex”> to the head section of that page or create an index file in a directory and add this to the head section of the index file of that directory.
What is the difference between “robots.txt and “no-index” ?
The major differences between “robots.txt and “no-index” are as follows
- While “no-index” meta tag is used to disallow indexing, The robots.txt file is used to guide a search engine as to which directories and files it should crawl. It does not stop content from being indexed and listed in search results.
- When search engine bots (Googlebot) crawl a page with no-index tag or header meta, it will drop that page entirely from google search results. Its important to note that for “no-index” to be effective, the page or resource must not be blocked by a robots.txt files
Be clear on what you want
Basically is an issue of crawling (robots.txt) and indexing(no-index). knowing all these, if you want content not to be included in search results, then use NOINDEX. If you want to stop search engines crawling a directory on your server because it contains nothing they need to see, then use “Disallow” directive in your robots.txt file.
If you enjoyed this post, I’d be very grateful if you’d help it spread by sharing it to your friends using the share button. you can also be the first to get out updates by following us on facebook, twitter, linkedin and instagram. Please also subscribe to our youtube channel for step by step guide on how to implement most of the contents written here.
Did you find this article helpful? or do you have other exciting ideas regarding this and how you are implementing them?
Please Let us know in the comments.