Zedez512:
I eventually got help from a sysadmin friend who found that one of the files had banned anything from spiders.txt from indexing my site. We argued about whether this was a normal function of zen cart and then his fix was to simply empty my spiders.txt file and I foolishly did not note down what file he had found the offending code in.
Curious. Although theoretically possible, the mind boggles at what was needed to make the spiders.txt file act as though it were a robots.txt file.
The spiders.txt file is a zencart thingy that prevents known spiders from creating SESSIONS. It doesn't (or isn't supposed to) prevent bots from crawling a site. That is what the robots.txt is for
Zedez512:
I can't get a hold of him to ask him to take a look and find the file again and I have downloaded all of my site files and searched a few keywords (such as spider) to try finding the code again without any luck. What can I do?.
IF the freelancer did somehow manage to make the spiders.txt file act like a robots.txt file s/he is both very clever and very foolish.
I couldn't. Why would anyone do that????
I wouldn't know where to start looking for this - So I won't even try. I'm hoping that the freelancer didn't make any actual code changes to pull this feat off.
What I can do is tell you what you should have.
... but first.....
Zedez512:
My who's online is bogged down by bots and extremely laggy.
As a general rule, bots are a good thing. Without them your site is going to be near impossible to find. Be very careful you don't block them all.
OK, so there are basically two files for you to check and consider
/includes/spiders.txt
This file contains a simple list of known bots. One per line. This file is part of all Zencart releases - it isn't version specific, so check the contents of this file, if it is empty (or near empty) just replace it with a copy from the ZenCart distribution files. It will contain over 500 lines/entries. Not something to be edited by hand.
This will take care a lot of the 'whos online' bot activity - but it doesn't prevent them.
The other file is called
robots.txt from crawling the site. This is located in the root folder of your store. It quite a small file, that would typically read like:
User-agent: *
Disallow: /cgi-bin/
Disallow: /cache/
Disallow: /logs/
This is telling all 'good' bots to not crawl the folders that are disallowed.
To Disallow a specific bot from crawling anything on the site, you'll need to add something like"
User-Agent: badbot
Disallow: /
You can find more examples here http://www.robotstxt.org/robotstxt.html
Restoring the spiders.txt file and judicially editing the robots.txt file should get things back to how they should be again. If not, you are going to have to dig really deep into the zencart code to see what the freelancer changed to make the spiders.txt file act like a robots.txt file. It probably won't come to that though 'cos it is giving the freelancer more credit than they deserve. ;-)
Important: Not all bots will 'honor' the contents of the robots.txt file - (Google, Bing, and most do). For those that don't, they need to be block via other means - generally via the .htaccess file(s), but there are other methods (such as using a firewall).
Hopefully this helps get you back on track.
Cheers
RodG
NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.
Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.