

Since you can’t use vhosts or subdirectories on that host, .htaccess can do it with mod_rewrite. Something like this in the .htaccess in your main folder (adjust the domain and filename):
RewriteEngine On
# project.test root -> serve the one file
RewriteCond %{HTTP_HOST} ^(www\.)?project\.test$ [NC]
RewriteRule ^$ /project.html [L]
# anything else on project.test -> 404
RewriteCond %{HTTP_HOST} ^(www\.)?project\.test$ [NC]
RewriteRule !^project\.html$ - [R=404,L]
How it works: each RewriteCond applies only to the RewriteRule right below it, and it checks the Host header, so example.net is never touched. The first rule serves project.html (internally, the URL in the browser stays project.test/) when someone visits the root. The second returns a 404 for every other path on that domain. The !^project\.html$ exception matters: Apache re-runs the rules after the internal rewrite, and without it the second rule would 404 your own page.
Two things to watch. If project.html uses CSS, JS or images, those requests also hit project.test and will 404, so either inline them or add them to the exception, e.g. !^(project\.html|style\.css)$. And in .htaccess the pattern has no leading slash (^$, not ^/$).
On regex: you don’t need to learn it first. Here you only need ^ (start), (end), \. (a literal dot) and ! (not). Learn the rest as you go. For learning, the mod_rewrite intro and the RewriteCond/RewriteRule reference in the Apache docs are decent, and regex101.com lets you test patterns live. If something doesn’t work, check the host’s error log, and note that some shared hosts cache .htaccess changes for a minute or so.
Nice project, running your own index is hard and 35M pages on home hardware is a real start. Since you asked for feedback, here are things that tend to matter most once a small crawler grows:
Be a polite, identifiable crawler. Use a distinct user agent with a URL that explains what Jase is and how to contact you, e.g.
JaseBot/1.0 (+https://your-site/bot). Site owners who can’t tell who you are just block you. Also don’t spoof a browser UA.robots.txt, by the book (RFC 9309). Cache it per host (up to ~24h is fine). A 4xx on robots.txt means you may crawl; a 5xx or timeout means treat the site as disallowed for now and retry later. Honour
Disallowfor your own token and fall back to*.Crawl-delayisn’t in the RFC, but many sites set it, so respecting it is cheap goodwill.Per-host politeness in the frontier. Keep one queue per host, with a minimum delay between hits (a few seconds is a sane default for small sites). Back off exponentially on 429/503 and read
Retry-Afterwhen it’s present. If a site keeps blocking you, drop it rather than rotating IPs or agents.Avoid crawler traps. Calendars, faceted shop filters, session IDs and infinite pagination can eat a huge share of a crawl. Normalise URLs (strip tracking params, sort query strings, lowercase host), cap depth and URLs per host, and honour
rel=canonical.Dedup. Exact duplicates by hashing the extracted main text. Near-duplicates with simhash or minhash. For an Italian-only index it’s also worth language-detecting at crawl time so you don’t store pages you’ll never serve.
Your full-disk problem. Don’t store raw HTML forever. Keep extracted text plus metadata, and gzip or zstd anything you keep as WARC. Make the crawler stop cleanly (or pause that machine’s queue) when disk is low, instead of failing mid-write, and checkpoint the frontier so a restart doesn’t lose state. A coordinator that shards by host (it sounds like you already do) also makes it simple to move a shard to another machine.
Seeding. Common Crawl publishes free WARC archives and a URL index, so you could pull the .it domains from there to discover hosts and fill gaps, then use your own crawler for freshness.
JS-heavy pages. Plain HTTP fetch plus parsing covers most of the web. Only render in a headless browser when the page body is empty and the site clearly needs it, since rendering costs far more CPU and memory per page than a plain fetch. Reading
schema.orgJSON-LD and the sitemap first often gets you titles, prices and dates without rendering anything.On lurch’s idea: an open shared index is attractive, but your reply about moderation is right. The moment others can submit URLs you need abuse handling, so I’d keep it closed until the crawler basics are solid.