
Web servers are unpredictable assholes, so I finally decided to build one that is predictably an asshole all the time.
You already know that web servers are assholes if you've ever done any web crawling or scraping: they lie about timestamps, have missing or outdated sitemaps, return empty responses, and so much more.
So I built a misbehaving web server that predictably exhibits all of the pathologies I've seen over the years. Honestly I should have done this decades ago. It's live at https://pathological.answersfrom.me, or you can build and host it yourself (https://github.com/andy-tmpt-me/afm-pathological).
If you do anything with web crawling or scraping, feel free to give it a try. I hope it fails miserably for you!
This is a web server with predictable bad behavior, for tests of crawlers, scrapers and HTTP clients. Each host name below selects a behavior of the whole host: how it answers robots.txt, sitemaps, feeds, HEAD requests, conditional requests and user agents. On every host the same page families serve one case per path: redirects, wrong content types, pages that change each day, link traps, slow and torn responses and more.
Each page is an article about sourdough baking, so that all pages read as the work of one author. The server keeps no state: each answer depends only on the request and its time. The root page of each host is its README, which lists every URL of that host with its behavior.
| Host | Character | What the host root says |
|---|---|---|
| breadcrumbs | You find its pages only by following links | robots.txt with no Sitemap line. No feed, no /sitemap.xml, no /wp-json |
| librarian | Keeps an accurate catalog | robots.txt lists /sitemap.xml. Each lastmod is the true date of the last change. ETag and Last-Modified are true; a conditional GET answers 304 |
| town-crier | Announces everything in a feed | An RSS feed at /feed. robots.txt with no Sitemap line |
| mirage | Promises a map that is not there | robots.txt lists /sitemap.xml, which answers 404 |
| chicken-little | Says that everything changed, each time | As librarian, but each lastmod, and the ETag and Last-Modified of each response, are the time of the request. The text of the 18 pages of its sitemap never changes |
| rip-van-winkle | Says that nothing changes | As librarian, but each lastmod is 2026-01-01, also for new pages. The ETag and Last-Modified of each response never change and each conditional GET answers 304. Its sitemap lists 20 URLs: the 18, and /chameleons/honest-edit and /chameleons/silent-edit, whose text changes each day |
| hoarder | Has more pages than a crawler probably wants | robots.txt lists /sitemap_index.xml: five nested sitemaps of 100 constant articles each (/hoard/1 to /hoard/500). The fifth also lists the seven daily pages, at its end: 507 URLs. The index has no dates |
| squirrel | Has a map and tells no one | /sitemap.xml exists with no lastmod. /robots.txt answers 404 |
| headless-horseman | Cannot answer a HEAD request | Each HEAD answers 405. GET is normal. An RSS feed at /feed. robots.txt with no Sitemap line |
| tipsy-cartographer | Draws maps that are wrong | robots.txt lists five sitemaps: /maps/good.xml (the 18 URLs, with a PHP warning before <?xml), /maps/missing.xml (404), /maps/feed.xml (an RSS feed), /maps/elsewhere.xml (only URLs of librarian and example.com) and /maps/malformed.xml (XML that does not parse) |
| gutenberg | Is a WordPress site | /wp-json/wp/v2/posts answers with JSON. The root page has <meta name="generator" content="WordPress 6.6">. An RSS feed at /feed |
| yes-man | Answers 200 to everything | Each path returns the README as text/html, also /robots.txt, /feed, /index.xml, /sitemap.xml and /wp-json/wp/v2/posts, for GET and HEAD |
| sloth | Takes its time | robots.txt, with no Sitemap line, answers after 15 s. Each HEAD answers after 12 s. Each other response answers after 2 s. A longer delay of a case stays: /potholes/slow-get answers a GET after 35 s |
| whisperer | Names its feed only in the head of its root page | No feed at the six root paths, no sitemap, robots.txt with no Sitemap line. The README has <link rel="alternate" type="application/rss+xml" href="/dispatches">. /dispatches is an RSS feed |
| masquerade | Serves its root page as XML | /index.xml returns the README HTML as application/xml. /feed returns it as text/html |
| janus | One site with two names | Two hostnames, same content. robots.txt lists /sitemap.xml. Each of its 18 URLs has the apex name. After the apex entry of /articles/starter it lists that page two more times: with the www. name, and with the host in upper case |
| forwarding-address | Moved away | Each path except /README.md and /clock, also /robots.txt, answers 301 to the same path on librarian |
| doorman | Lets in only guests that it does not know | Each request with a Chrome 120 User-Agent (Chrome/120.0.0.0) answers 403, also /robots.txt and each HEAD. Each other request is normal. robots.txt has no Sitemap line |
The host janus also answers at its second name, www.janus.pathological.answersfrom.me.
The host is the first label of the Host header, after an optional www.. The request header X-Pathological-Host: <host name> replaces the Host header, so curl -H 'X-Pathological-Host: breadcrumbs' https://pathological.answersfrom.me/ reaches breadcrumbs through this address; a value that is not a host name answers 404 with the list of host names on every path. With no such header, a Host that names no host answers this page at / (as Markdown at /README.md), /clock, /preview.jpg (the image of a link preview), a robots.txt that allows only this page and that image, and 404 on every other path.
Content that changes each day uses the day number: the number of days from 2026-01-01 to the UTC date of the request. The request header X-Pathological-Date: YYYY-MM-DD replaces the date for one request, and /clock returns the UTC time, the date and the day number as JSON. Behavior that needs state uses two 30-second slots: a request in seconds 0 to 29 of the minute is in the error slot, one in seconds 30 to 59 in the ok slot.
These open-source projects and public sites also give a crawler, a scraper or an HTTP client something difficult to work with.
| Project | What it is |
|---|---|
| crawler-test.com | A site of test pages for SEO crawlers: titles, description tags, encodings, robots rules, redirects, links, canonical tags and status codes. |
| Security Crawl Maze | A test bed for security crawlers. Its pages link to a resource in every way that a web page can, and one endpoint returns the URLs that a crawler must find. |
| HttpCrawlerTestSite | A small PHP site that tests the essential functions of a crawler. |
| Hamms | A badly behaved HTTP server for tests of HTTP clients. Each port has one failure: no answer, a slow answer, a malformed answer or a closed connection. |
| pathod | A pathological HTTP daemon. A small language in the URL builds almost any response, a malformed one included. |
| huhhttp | An evil web server that fuzz tests crawlers and download tools with malformed and hostile responses. |
| errorworks (ChaosWeb) | Fake servers that inject faults at configured rates. ChaosWeb is the web server for tests of scrapers. |
| go-httpbin | A general HTTP request and response service: status codes, delays, redirects, headers and bodies on request. |
| Toxiproxy | A TCP proxy that adds latency, timeouts and outages between a client and a real server. |
| toscrape.com | Practice sites for web scraping (a book store and a quotes site) that exercise data extraction. |
| Nepenthes | A tarpit that gives unwanted crawlers an endless maze of slow, generated pages. |
| iocaine | A tarpit that gives unwanted crawlers an endless maze of generated text. |
The source code is at https://github.com/andy-tmpt-me/afm-pathological, under the MIT licence.