{"slug": "i-taught-a-computer-to-spot-fake-websites-with-96-accuracy", "title": "I Taught a Computer to Spot Fake Websites With 96% Accuracy", "summary": "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.", "body_md": "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.\n\nIf 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.\n\nTraditional defenses (blacklists of known bad URLs) are always playing catch-up. Attackers spin up new fake domains faster than blacklists can be updated.\n\nInstead of memorizing bad URLs, what if a model learned the shared traits of phishing sites? Things like:\n\nI used the UCI Phishing Websites dataset — 11,055 real websites, each labeled phishing or legitimate, described by 30 features.\n\nI trained and compared three classic ML algorithms:\n\n| Algorithm | Accuracy | \n|---|---|\n| Logistic Regression | 92.45% | \n| Random Forest | 96.70% 🏆 | \n| SVM | 94.71% | \n\nWhen I checked which features mattered most, SSL certificate state and anchor link behavior dominated — by a wide margin over the other 28 features.\n\nWhy? Because phishing sites usually:\n\nThe model figured this out on its own — I never told it to focus on SSL.\n\nThe 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.\n\nFull code and details are on GitHub:\n\n🔗 [https://github.com/eln2mac-has/phishing-detection-ml](https://github.com/eln2mac-has/phishing-detection-ml)\n\nIf you try something similar or have questions, drop a comment below 👇", "url": "https://wpnews.pro/news/i-taught-a-computer-to-spot-fake-websites-with-96-accuracy", "canonical_source": "https://dev.to/eln2mac/i-taught-a-computer-to-spot-fake-websites-with-96-accuracy-3ikh", "published_at": "2026-09-29 20:15:53+00:00", "updated_at": "2026-09-29 20:16:59.279175+00:00", "lang": "en", "topics": ["machine-learning", "artificial-intelligence"], "entities": ["UCI Phishing Websites dataset", "GitHub", "scikit-learn", "Python"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-taught-a-computer-to-spot-fake-websites-with-96-accuracy", "markdown": "https://wpnews.pro/news/i-taught-a-computer-to-spot-fake-websites-with-96-accuracy.md", "text": "https://wpnews.pro/news/i-taught-a-computer-to-spot-fake-websites-with-96-accuracy.txt", "jsonld": "https://wpnews.pro/news/i-taught-a-computer-to-spot-fake-websites-with-96-accuracy.jsonld"}}