Learn how to block robots.txt file from being indexed by Google or if it is already indexed, learn how to remove robots.txt from search result.
Add the following code to your robots.txt file in order to block it from being indexed by Google.
User-agent: * Dissallow: /robots.txt
Now go to Google webmaster and fetch the updated robots.txt file.
Wait for two or three days for the changes to take effect.
If your robots.txt file is already indexed and being shown in search results, you can remove it.
- Go to Google Webmaster
- Navigate to Google Index -> Remove URLs
- Click Create a new removal request button and enter robots.txt in the input field and click Continue
- Click Submit Request
- Wait for two or three days, Your robots.txt file will be removed from Google search result.
I’ll see you in next tutorial. Keep sharing this post.