Skip to main content

robot.txt what is this and how to use this


What do they do exactly?

Robot.txt files tell your instructions to a search engine robot..

The first thing a search engine spider looks at when it is visiting a page is the robots.txt file. It looks for it because it wants to know what it should do. If you have instructions for a search engine robot, you must tell it those instructions.
The most common problem people have with robot.txt files is that they don't know how to make them.

If you can make web pages, you can also make a robot.txt file. The file is a text file, which means that you can use notepad, wordpad, or any other plain text editor. You can also make them in Frontpage or Dreamweaver by using the "code" view. You can even "copy and paste" them.

So instead of thinking "I am making a robot.txt file", just think, "I am writing a note" they are the exact same process. However you would write a note or a letter on your computer will work for the robot.txt file.
robot.txt files and search robots

What should the robot.txt say?

That depends on what you want it to do.

Most people want robots to visit everything in their website. If this is the case with you, and you want the robot to index all parts of your site, there are three options to let the robots know that they are welcome.
1) Do not have a robot.txt file
If your website does not have a robot.txt file then this is what happens -
A robot comes to visit. It looks for the robot.txt file. It does not find it because it isn't there. The robot then feels free to visit all your web pages and content because this is what it is programmed to do in this situation.
2) Make an empty file and call it robots.txt
If your website has a robot.txt file that has nothing in it then this is what happens -
A robot comes to visit. It looks for the robot.txt file. It finds the file and reads it. There is nothing to read, so the robot then feels free to visit all your web pages and content because this is what it is programmed to do in this situation.
3) Make a file called robots.txt and write the following two lines in it... (these are "instructions" for the robot to follow)

User-agent: *

Disallow:
If your website has a robot.txt with these instructions in it then this is what happens -

A robot comes to visit. It looks for the robot.txt file. It finds the file and reads it. It reads the first line. Then it reads the second line. The robot then feels free to visit all your web pages and content because this is what it is what you told it to do.

What do the robot instructions mean?

Here is an explanation of what the different words mean in a robot.txt file
User-agent:
The "User-agent" part is there to specify directions to a specific robot if needed. There are two ways to use this in your file.

If you want to tell all robots the same thing you put a " * " after the "User-agent" It would look like this...
User-agent: *
(This line is saying "these directions apply to all robots")

If you want to tell a specific robot something (in this example Googlebot) it would look like this...
User-agent: Googlebot
(this line is saying "these directions apply to just Googlebot")
Disallow:
The "Disallow" part is there to tell the robots what folders they should not look at.

This means that if, for example you do not want search engines to index the photos on your site then you can place those photos into one folder and exclude it.

Lets say that you have put all these photos into a folder called "photos". Now you want to tell search engines not to index that folder.

Here is what your robot.txt file should look like:

User-agent: *
Disallow: /photos

The above two lines of text in your robots.txt file would keep robots from visiting your photos folder. The "User-agent *" part is saying "this applies to all robots". The "Disallow: /photos" part is saying "don't visit or index my photos folder".

Googlebot specific instructions

The robot that Google uses to index their search engine is called Googlebot. It understands a few more instructions than other robots. The instructions it follows are well defined in the Google help pages (see resources below).

In addition to the "User-name" and "Disallow" Googlebot also uses the...
Allow:
The "Allow:" instructions lets you tell a robot that it is okay to see a file in a folder that has been "Disallowed" by other instructions.

To illustrate this, let's take the above example of telling the robot not to visit or index your photos. We put all the photos into one folder called "photos" and we made a robot.txt file that looked like this...
User-agent: *
Disallow: /photos

Now let's say there was a photo called mycar.jpg in that folder that you want Googlebot to index. With the Allow: instruction, we can tell Googlebot to do so, it would look like this...

User-agent: *
Disallow: /photos
Allow: /photos/mycar.jpg
This would tell Googlebot that it can visit "mycar.jpg" in the photo folder, even though the "photo" folder is otherwise excluded.
Testing your robot.txt file
If you are using a Google sitemap as part of their webmaster tools, then you can log in and see if Google is having any issues crawling your site. There is also a robot.txt tool that allows you to experiment a little, letting you know if their are any problems with your file prior to putting it online.

Key Concept:


- If you use a robots.txt file, make sure it is correctly written because an incorrect robots.txt file can block the bots that index your website.

Comments

Popular posts from this blog

Track Lost Android Phone and Tablet

1. Use the IMEI Number Every Android phone carries a unique IMEI number. It will be printed at the back of your device. If you are unable to find the number, you have to launch your phone app and dial the number *#06#. This will give you the IMEI number of your phone. Store this number in a safe place so that it helps you in locating your phone when it is lost 2 Android Device Manager Google has recently released a new locator feature for Android gadgets called Android Device Manager, which helps its users locate their lost or stolen phones and tablets. It functions in the same way as Lookout and Samsung’s “Find My Mobile”. Here’s how to use Android Device Manager. Go to the Google Settings app, then select Android device manager. By default, the locator feature is activated but to activate remote data wipe, select the box next to “Allow remote factory reset”, then select “activate”. To use this feature, open the site https://www.google.com/android/devicemanager and sig...

DOWNLOAD CODE BLOCKS 16.01 MINGW.SETUP .EXE 86.3 MB

Code::Blocks for Mac is a free C, C++ and Fortran IDE that has a custom build system and optional Make support. The application has been designed to be very extensible and fully configurable. Code::Blocks is an IDE packed full of all the features you will need. It has a consistent look, feel and operation across its supported platforms. It has been built around a plugin framework, therefore Code::Blocks can be extended with plugins. Support for any kind of functionality can be added by installing/coding a plugin. Key features include: Written in C++. No interpreted languages or proprietary libs needed.. Full plugin support. Multiple compiler support: GCC (MingW / GNU GCC), MSVC++, clang, Digital Mars, Borland C++ 5.5, and Open Watcom etc. Support for parallel builds. Imports Dev-C++ projects. Debugger with full breakpoints support. Cross-platform. Code::Blocks' interface is both customizable and extensible with Syntax highlighting, a tabbed interface, Class Br...

8 Tools to Track Registry and File Changes by installing a software

1.  Regshot unicode Regshot is a long running utility that can quickly take a before and after snapshot of the system registry. Also in the more recent unicode version it’s gained the ability to monitor for file changes using CRC32 and MD5 file checksums although this function is turned off by default and you have to go to File -> Options -> Common Options -> and tick “Check files in the specified folders” to enable it. Only the Windows folder is entered into the list of watched folders so you have to enter any others yourself through the Folders tab. This version also added the Connect to remote registry option. Regshot is very much a “hands on” utility and is more for experienced or advanced users to quickly check for system changes between two different points in time. Simply create the 1st shot, install the software or run the program you want to watch, and then press 2nd shot. After comparing the differences in the 1st and 2nd shots, it will open an HTML log ...

13 websites to register your free domain

Register your Free Domain Now!! 1)  .tk Dot TK is a FREE domain registry for websites on the Internet. It has exactly the same power as other domain extensions, but it’s free! Because it’s free, millions of others have been using .TK domains since 2001 – which makes .TK powerful and very recognizable.  Your website will be like www.yourdomainname.tk . It is free for 1 year. It’s a ccTLD domain whixh having the abbreviation  Tokelau. To create a .tk domain, Visit   www.dot.tk 2) co.cc Co.cc is completely free domain which is mostly used by blogspot bloggers because of it’s easy to use DNS system. Creating a co.cc for blogger is simple ( for instructions- “click here”). Your website will be like www.yourdomainname.co.cc . To create a .co.cc domain, visit www.co.cc 3)   co.nr co.nr is too like co.cc. Your website will be like  www.yourdomainname.co.nr . You can add it for blogger also.. To create a .co.cc domain, vi...

Bypass Online Surveys to Download a File

Pop Up windows by Fileice or Sharecash If you have Seen this Type of window before Downloading any file then you are welcome to give a read to this article.You will know that why you should not  download this  file or if you really want to download it without performing any real  online survey  then How to do it.Also see :  How to Make Money with PPD sites Without any Blog Note : I don’t Download anything From any PPD(Pay per Download) sites as most of the Downloads does not work and there are many More Other methods to get a File from Internet (Eg. Torrent ).So First thing I’ll Suggest you that Do not download anything from Fileice.net and Sharecash.org as they are not worthy of your countless seconds. So If you are not satisfied by my above mentioned Statement then I have some Tips/Tricks for you by which you can Bypass  Online Surveys  for Downloading a File.It is whether Fileice or Sharecash.I have found these trick and Tips on Go...

FIXED : Google adsense error in inserting code to blog throwing error Attribute name "async" associated with an element type "script" must be followed by the ' = ' character

Error - Asynchronous adsense code in HTML just add ='async' between async and src of your code ... let say my code for adsense is < script async src = 'http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' ></ script > then do the following...... < script async = 'async' src = 'http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' ></ script > notice the difference this is how you can add that error and display the google ads ..

Google Sheet/Google form Script to send automated Email to users

Well many of us want to send especially bloggers sometimes want to send automated replies to user 's ..but as usual, not everyone is a code geek or lovers ... so this is a small guide to How to use Google form with Google sheet to make an automated reply link....so follow the steps accordingly. STEP 1: GOTO google Forms ... and create a form ... in my case I just take users email id and how do they get to my site. 1. GOTO   https://docs.google.com/forms?usp=mkt_forms 2. login with your account. now choose blank form. 3. in Form title write your forms name, for example, let say my form. 4. in Form description write the description let say  A simple form ... 5. now go to setting and in general tab, check collect email address. and  click on save 6. (optional) you can also ask some basic question 7. now goto responses tab now click on create new spreadsheet button. (that green icon ..) in select response, destination cho...

Java Program to print integers you have input through console using BufferedReader and StringTokenizer

import java.util.*; import java.io.*;   class Buf_R_Str_Token{      public static void main(String args[]) throws IOException{          BufferedReader b_r = new BufferedReader( new InputStreamReader(System.in));          String str = b_r.readLine();                     StringTokenizer st = new StringTokenizer(str, "," );                     String item;          try {              while ((item = st.nextToken()) != null ){                  System.out.print( " " + item);      ...

Download Complete Websites For Offline Access

there  are the various tool available on the internet to download a complete site .. with the following tool you can download a complete site or a particular section of a site: 1.Internet Download manager : In the internet download manager, you can use Site Grabber option to download a site. this is what I mostly use ..some other alternatives are. Getleft Getleft   has a new, modern feel to its interface. Upon launch, press   “Ctrl + U”   to quickly get started by entering an URL and save directory. Before the download begins, you’ll be asked which files should be downloaded. We are using Google as our example, so these pages should look familiar. Every page that’s included in the download will be extracted, which means every file from those particular pages will be downloaded. Once begun, all files will be pulled to the local system like so: DOWNLOAD GETLEFT PageNest DOWNLOAD PAGENEST Cyotek WebCopy ...

how to implement adding of numbers in PROLOG

write a knowledge base add.pl with the following rules: // for two variables  sum(X,Y):-     S is X+Y,    write('sum of '),write(X),write('and '),write(Y),write('is ='),write(S). add:-     write_ln('Enter the first number:-'),     read(First),     write_ln('Enter second number:-'),     read(Second),     S is First+Second,      write('sum of '),write(First),write('and '),write(Second),write('is ='),write(S). now we can close this windows and in the main WINDOW either type  ['add.pl']. or consult the add.pl file. now you can call this funcation via two ways :- ?- sum(5,44). it will give output as  sum of 5 and 44 is 49 or you can call via  add. Enter the first number . :| 45. Enter the second Number . :| 45. sum of 45 and 45 is equal to 90. note i have used sum:- instead of add:- so i ha...