cd /news/machine-learning/i-taught-a-computer-to-spot-fake-web… Β· home β€Ί topics β€Ί machine-learning β€Ί article
[ARTICLE Β· art-142019] src=dev.to β†— pub= topic=machine-learning verified=true sentiment=↑ positive

I Taught a Computer to Spot Fake Websites With 96% Accuracy

A developer built a machine learning model that detects phishing websites from URL and page features with 96.7% accuracy, without opening the sites. Trained on the UCI Phishing Websites dataset of 11,055 labeled sites across 30 features, a Random Forest classifier outperformed logistic regression (92.45%) and SVM (94.71%), with SSL certificate state and anchor link behavior emerging as the dominant predictive features. The code is published on GitHub.

by read1 min views1 publishedSep 29, 2026

What if a computer could tell a fake website is fake just by looking at its URL β€” without ever opening it? Turns out, yes. Here's how I built my first real machine learning project.

If you've ever gotten a message saying "Your bank account is suspended, click here now," you've seen phishing in action β€” fake websites disguised as real ones, built to steal your password or credit card number. Traditional defenses (blacklists of known bad URLs) are always playing catch-up. Attackers spin up new fake domains faster than blacklists can be updated.

Instead of memorizing bad URLs, what if a model learned the shared traits of phishing sites? Things like:

I used the UCI Phishing Websites dataset β€” 11,055 real websites, each labeled phishing or legitimate, described by 30 features.

I trained and compared three classic ML algorithms:

Algorithm Accuracy
Logistic Regression 92.45%
Random Forest 96.70% πŸ†
SVM 94.71%

When I checked which features mattered most, SSL certificate state and anchor link behavior dominated β€” by a wide margin over the other 28 features.

Why? Because phishing sites usually:

The model figured this out on its own β€” I never told it to focus on SSL.

The biggest lesson: you don't need to be an expert to start. The dataset was ready-made, the tools (Python + scikit-learn) are free, and the steps are well-documented. What it actually took was patience and consistency.

Full code and details are on GitHub:

πŸ”— [https://github.com/eln2mac-has/phishing-detection-ml](https://github.com/eln2mac-has/phishing-detection-ml)

If you try something similar or have questions, drop a comment below πŸ‘‡
── more in #machine-learning 4 stories Β· sorted by recency
── more on @uci phishing websites dataset 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/i-taught-a-computer-…] indexed:0 read:1min 2026-09-29 Β· β€”