How to set a file accesible for search-bots not through Browser
File accesible for search-bots not through Browser
milan oberoy
12:42 pm on May 21, 2011 (gmt 0)
Hello guys,
I have a file which i want to be accessible only for search-bots (such as googlebot and yahoo). same time no one else should be able to open through browsers.
Any idea how to get it done through htaccess?
rainborick
2:53 pm on May 22, 2011 (gmt 0)
Serving content in this way is almost certainly a violation of the search engines' guidelines and will leave your site vulnerable to being penalized. The general principle is that you should serve the same content to users and search engines.
I'd suggest that you create a page that describes the file you want to control and include whatever link or form you require to allow users to access that file. That way the page can legally compete in the search results and you'll still be in control over access to the file itself. Good luck!
g1smd
8:48 pm on May 22, 2011 (gmt 0)
You can do it by detecting the User Agent string, but you are playing with fire, as explained above.