Skip to content

web search done right

webmasters

Mikkel Denker2784789a3941
diff --git a/frontend/src/routes/webmasters/+page.server.ts b/frontend/src/routes/webmasters/+page.server.ts
new file mode 100644
index 00000000..cfa45e0a
--- /dev/null
+++ b/frontend/src/routes/webmasters/+page.server.ts
@@ -0,0 +1,7 @@
+import { loadMarkdown } from '$lib/server/articles';
+import type { PageServerLoad } from './$types';
+
+export const load: PageServerLoad = async () => {
+ const { md } = await loadMarkdown('src/routes/webmasters/README.md');
+ return { md, globals: { title: 'Webmasters' } };
+};
diff --git a/frontend/src/routes/webmasters/+page.svelte b/frontend/src/routes/webmasters/+page.svelte
new file mode 100644
index 00000000..944b674f
--- /dev/null
+++ b/frontend/src/routes/webmasters/+page.svelte
@@ -0,0 +1,10 @@
+<script lang="ts">
+ import Article from '$lib/components/Article.svelte';
+ import type { PageData } from './$types';
+
+ export let data: PageData;
+</script>
+
+<Article>
+ {@html data.md}
+</Article>
diff --git a/frontend/src/routes/webmasters/README.md b/frontend/src/routes/webmasters/README.md
new file mode 100644
index 00000000..b5db1e20
--- /dev/null
+++ b/frontend/src/routes/webmasters/README.md
@@ -0,0 +1,15 @@
+# Stract Crawler
+Stract is an [open source](https://github.com/StractOrg/stract/) web search engine. StractBot is the name of our crawler that collects pages from the web in order to build the index.
+It is written in Rust and the source code can be found [here](https://github.com/StractOrg/stract/tree/main/core/src/crawler).
+The crawler uses the user agent `Mozilla/5.0 (compatible; StractBot/0.1; open source search engine; +https://trystract.com/webmasters)`.
+
+## Politeness
+StractBot is a polite crawler. It respects the [robots.txt](https://en.wikipedia.org/wiki/Robots.txt) file of the website it is crawling and tries to not overload the server.
+It does this by waiting a certain amount of time between requests to the same domain. The waiting time is calculated by *min(max(fetchtime * politeness, 1 sec), 60 sec)* where *fetchtime* is the time it took to fetch the page. The crawler will wait at least 1 sec between requests and at most 60 seconds.
+This dynamic waiting time tries to prevent us from disrupting servers that cannot handle the load, while not giving unnecessary politeness to servers that can. The politeness factor starts at 1 and is doubled every time the crawler gets a 429 response from the server (to at most 2048).
+
+The crawler looks for the token `StractBot` in the robots.txt file to determine which pages (if any) the crawler is allowed to crawl.
+The robots.txt file is cached for 1 hour, so changes to the file should be respected quite quickly.
+
+## Contact us
+If you have any concerns or bad experiences with our crawler, please don't hesitate to reach out to us at [[email protected]](mailto:[email protected]). Chances are that others experience the same problems and we would love to fix them.