🛡️
Hosting

Protecting an OJS journal site from bots: search, load and logs

21.11.2026
← All articles

An academic journal site looks like a quiet place: a few hundred readers a day and a handful of authors and editors. Yet OJS sites often hit the same wall: the site suddenly slows down, pages time out, hosting resources run out and the statistics show tens of thousands of views nobody believes. The cause is usually bots, not people. Here is why OJS attracts them, how to find the source and how to limit it without blocking useful search engines.

Why OJS sites suffer so much

Every article has several pages: the abstract, the PDF, sometimes an HTML version and citation exports in multiple formats, plus pages for every issue, author and keyword. The search page generates an endless number of URLs from query parameters. Search is also the heaviest page, because each query runs a full-text lookup in the database. A bot opening several search pages per second quickly exhausts PHP processes and database connections, and on a server hosting many journals one bot wave can affect the neighbours too. Crawlers collecting data for AI models have made the problem worse.

Diagnose first: find the real source in the logs

Find out who is generating the load before blocking anything. The site's access log is in the ISPmanager logs section, or you can ask support for it:

# IP addresses sending the most requests
awk '{print $1}' access.log | sort | uniq -c | sort -rn | head -20

# most active user agents
awk -F'"' '{print $6}' access.log | sort | uniq -c | sort -rn | head -20

# number of requests to the search page
grep -c "/search" access.log

The picture is usually clear: a few bots send most of the traffic. On a medical journal site in Andijan, for example, the slowdown might turn out to be one SEO crawler hammering the search page with different keywords.

Step one: robots.txt

Well-behaved bots, including search engines, follow robots.txt. Closing search, login, registration and citation export pages makes sense, while article pages and PDFs must stay open. Whether to block AI crawlers is the editorial board's call; two are blocked in this example.

User-agent: *
Disallow: /index.php/*/search
Disallow: /index.php/*/login
Disallow: /index.php/*/user/register
Disallow: /index.php/*/citationstylelanguage/

User-agent: GPTBot
Disallow: /

User-agent: CCBot
Disallow: /

Remember that robots.txt is a request, not enforcement, and Google ignores Crawl-delay.

Step two: block abusive bots in .htaccess

Bots that ignore the rules have to be stopped at the server. On shared hosting, put this block at the very top of .htaccess, before the OJS rewrite rules, and fill the list with the bots from your own logs:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (Bytespider|PetalBot|MJ12bot|DotBot|DataForSeoBot) [NC]
RewriteRule .* - [F,L]
</IfModule>

Keep the list short, since a bot marked "bad" in public lists may belong to a service useful to your journal, and watch the logs for a few days after each change.

On a VPS: rate limiting with Nginx

A bot can fake its user agent, so name-based blocking is not enough. With your own VPS, Nginx's limit_req caps requests per IP; humans never notice, bots slow down immediately. Adjust proxy_pass to match how PHP is wired on your server, test with nginx -t and reload. Requests over the limit get status 429.

# inside http {}
limit_req_zone $binary_remote_addr zone=ojs_search:10m rate=30r/m;

# inside server {}
location ~ ^/index\.php/[^/]+/search {
    limit_req zone=ojs_search burst=10 nodelay;
    limit_req_status 429;
    proxy_pass http://127.0.0.1:8080;
}

Do not block Google and Google Scholar

The worst mistake is protection so strict that articles vanish from search. Some bad bots pretend to be Googlebot, so verify by IP: a genuine Google crawler resolves to googlebot.com or google.com, and that name resolves back to the same IP.

host 66.249.66.1
# the answer must end in googlebot.com, then check it the other way:
host crawl-66-249-66-1.googlebot.com

Fake "Googlebots" from foreign networks are safe to block by IP; real Google addresses never are. Watch webmaster tools for indexing errors for a few weeks after tightening protection.

Statistics and ongoing monitoring

Bots also inflate view and download counts. Newer OJS versions filter known bots from statistics, but not all of them, so server-level limits are still needed. The bot landscape keeps changing, so review logs monthly and update the rules. If the site slows down and you cannot find why, contact sayt.uz support and we will help identify the source on the server side.

Related articles

🛠️ How to Contact Hosting Support So Your Issue Gets Solved Fast 🧭 Self-Hosting a Vector Database: Qdrant and pgvector 🧭 Portainer: Managing Docker from Your Browser 💾 How to Restore a Site and Database from Backup in ISPmanager
🌐 Language
🇺🇿 O⁠'zbek 🇺🇿 Özbek (yangi) 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓