How to create a robots.txt file to hide a view page from search engines in codeigniter

StackOverflow https://stackoverflow.com/questions/19761737

  •  03-07-2022
  •  | 
  •  

Frage

How to create a robots.txt file in a codeigniter project to hide a view page . where should i place this robots.txt file currently i have created file like this

User-agent: *
Disallow: /application/views/myviewpage.php

in side /public_html/folder/robots.txt (Where i place my .htaccess file). Is there any way to test this?

War es hilfreich?

Lösung

The robots.txt file MUST be placed in the document root of the host. It won’t work in other locations.

If your host is example.com, it needs to be accessible at http://example.com/robots.txt.

If your host is www.example.com, it needs to be accessible at http://www.example.com/robots.txt.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top