How to stop some codes from being indexed

stevency1569

New Member
Wurlie User
Jun 16, 2012
8
0
0
Hello,

I found search engines indexed some of the javascript pages on the site. It seems possibly a security issue. Do anybody else observe the same and how do I stop them being indexed? Thanks.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
It's not a security issue as anyone visiting your site can view the js files. Although you can stop them from being indexed with a robots.txt file in the root. Something like this:

Code:
User-agent: *
Disallow: /admin
Disallow: /api
Disallow: /includes
Disallow: /js
Disallow: /plugins
Disallow: /themes
(Thanks to yetisharemods for his similar post :) )