What is the difference between .htaccess and robots.txt?

3 replies
  • SEO
  • |
Please someone let me know the difference between these two:

.htaccess and robots.txt, thanks !
#difference #htaccess #robotstxt
  • Profile picture of the author iloveseo
    robots.txt is a file specially used for the bots.The search engines follow the directions specified by the robots.txt file (Although there are chances that some of the bots might not follow).

    .htaccess is a file used to restrict users from accessing your private pages, or for redirecting the url's.It gives directions to the servers rather than the search engines.

    robots.txt jis ust directions while the real control rests with htaccess.
    {{ DiscussionBoard.errors[3179723].message }}
  • Profile picture of the author pc101seo
    Originally Posted by zsawevv212 View Post

    Please someone let me know the difference between these two:

    .htaccess and robots.txt, thanks !
    .htaccess is a extension and robots.txt is a file.

    Common usage
    Authorization, authentication
    .htaccess files are often used to specify the security restrictions for the particular directory, hence the filename "access". The .htaccess file is often accompanied by a .htpasswd file which stores valid usernames and their passwords

    The Robot Exclusion Standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a website which is otherwise publicly viewable
    {{ DiscussionBoard.errors[3179837].message }}
    • Profile picture of the author Yurii
      The .htaccess file is a configuration file which is used on Apache based web servers to control many features of the server. The file itself is just a small basic text file and can be edited via your hosts file manager or alternatively you can download the file, edit it and reupload it.

      On the other hand robot.txt is a text (not html) file you put on your site to tell search robots which pages you would like them not to visit. Robots.txt is by no means mandatory for search engines but generally search engines obey what they are asked not to do. It is important to clarify that robots.txt is not a way from preventing search engines from crawling your site (i.e. it is not a firewall, or a kind of password protection) and the fact that you put a robots.txt file is something like putting a note "Please, do not enter" on an unlocked door - e.g. you cannot prevent thieves from coming in but the good guys will not open to door and enter. That is why we say that if you have really sensitive data, it is too naive to rely on robots.txt to protect it from being indexed and displayed in search results.
      {{ DiscussionBoard.errors[3179910].message }}

Trending Topics