Skip to content

Commit 143f88d

Browse files
8ctopuszeripath
authored andcommitted
More extensive robots.txt docs (go-gitea#9566)
1 parent 5749b26 commit 143f88d

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ environment variable; this can be used to override the default path to something
4444

4545
**Note:** Gitea must perform a full restart to see configuration changes.
4646

47-
## Customizing /robots.txt
48-
49-
To make Gitea serve a custom `/robots.txt` (default: empty 404), create a file called
50-
`robots.txt` in the `custom` folder (or `CustomPath`) with
51-
[expected contents](http://www.robotstxt.org/).
52-
5347
## Serving custom public files
5448

5549
To make Gitea serve custom public files (like pages and images), use the folder
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
date: "2019-12-31T13:55:00+05:00"
3+
title: "Advanced: Search Engines Indexation"
4+
slug: "search-engines-indexation"
5+
weight: 30
6+
toc: true
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "advanced"
11+
name: "Search Engines Indexation"
12+
weight: 60
13+
identifier: "search-engines-indexation"
14+
---
15+
16+
# Search engines indexation of your Gitea installation
17+
18+
By default your Gitea installation will be indexed by search engines.
19+
If you don't want your repository to be visible for search engines read further.
20+
21+
## Block search engines indexation using robots.txt
22+
23+
To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations,
24+
create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}})
25+
26+
Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt).
27+
28+
29+
```txt
30+
User-agent: *
31+
Disallow: /
32+
```
33+
34+
If you installed Gitea in a subdirectory, you will need to create or edit the `robots.txt` in the top level directory.
35+
36+
```txt
37+
User-agent: *
38+
Disallow: /gitea/
39+
```

0 commit comments

Comments
 (0)