PDA

View Full Version : How to add robot.txt file in the website?



PoolMaster
05-17-2019, 05:19 AM
How to add robot.txt file in the website?

WoodsPainting
05-17-2019, 05:37 AM
A robots.txt is simply an ASCII or plain text file that tells the search engines where they are not allowed to go on a site – also known as the Standard for Robot Exclusion. Any files or folders listed in this document will not be crawled and indexed by the search engine spiders. Having a robots.txt, even a blank one, shows you acknowledge that search engines are allowed on your site and that they may have free access to it. We recommend adding a robots text file to your main domain and all sub-domains on your site.

Writing a robots.txt is an easy process. Follow these simple steps:

Open Notepad, Microsoft Word or any text editor and save the file as ‘robots,’ all lowercase, making sure to choose .txt as the file type extension (in Word, choose ‘Plain Text’ ).
Next, add the following two lines of text to your file:
User-agent: *
Disallow:

‘User-agent’ is another word for robots or search engine spiders. The asterisk (*) denotes that this line applies to all of the spiders. Here, there is no file or folder listed in the Disallow line, implying that every directory on your site may be accessed. This is a basic robots text file.

Blocking the search engine spiders from your whole site is also one of the robots.txt options. To do this, add these two lines to the file:
User-agent: *
Disallow: /

If you’d like to block the spiders from certain areas of your site, your robots.txt might look something like this:
User-agent: *
Disallow: /database/
Disallow: /scripts/

The above three lines tells all robots that they are not allowed to access anything in the database and scripts directories or sub-directories. Keep in mind that only one file or folder can be used per Disallow line. You may add as many Disallow lines as you need.

Be sure to add your search engine friendly XML sitemap file to the robots text file. This will ensure that the spiders can find your sitemap and easily index all of your site’s pages.

Once complete, save and upload your robots.txt file to the root directory of your site.
Once the file is in place, check the robots.txt file for any errors.

amarnathsmm
05-17-2019, 06:58 AM
User-agent: *
Disallow:

Place this code in your notepad and save it as robots.txt and then upload in root directory of your hosting.

piqued
05-17-2019, 07:01 AM
Be sure to add your search engine friendly XML sitemap file to the robots text file. This will ensure that the spiders can find your sitemap and easily index all of your site’s pages. Use this syntax:
Sitemap: http://www.mydomain.com/sitemap.xml

Once complete, save and upload your robots.txt file to the root directory of your site. For example, if your domain is www.mydomain.com, you will place the file at www.mydomain.com/robots.txt.

shardavidyalaya
05-17-2019, 07:25 AM
Submit your updated robots.txt to Google. The Submit function of the robots.txt Tester tool allows you to easily put in place and ask Google to more quickly crawl and index a new robots.txt file for your site.

CBSE Schools in Bhilai | Best CBSE Schools in Chhattisgarh | Bhilai CBSE Schools (http://www.shardavidyalaya.edu.in/)

ametuniversity
05-17-2019, 10:30 AM
Follow these simple steps: Open Notepad, Microsoft Word or any text editor and save the file as 'robots,' all lowercase, making sure to choose .txt as the file type extension (in Word, choose 'Plain Text' ). Next, add the following two lines of text to your file

davidweb09
05-18-2019, 09:07 AM
Install Yoast SEO plugins (if you are using WordPress CMS) it will generate sitemap & robots files automatically. https://www.tuamazing.com/