Skip to content
Snippets Groups Projects
Verified Commit f562b4e9 authored by Christian Heusel's avatar Christian Heusel :rocket:
Browse files

aurweb: Create robots.txt

This should i.e. forbid crawlers to index all of the git diffs which
put's unneccessary load on the server and is not really of benefit to be
indexed anyways.

Link: #610


Reviewed-by: default avatarSven-Hendrik Haase <svenstaro@gmail.com>
Reviewed-by: Levente Polyak's avatarLevente Polyak <anthraxx@archlinux.org>
Signed-off-by: default avatarChristian Heusel <christian@heusel.eu>
parent b3f60d10
No related branches found
No related tags found
1 merge request!854aurweb: Create robots.txt
Pipeline #103695 passed
User-agent: *
# block the search page from indexing, as the search is done via URL parameters
Disallow: /packages?*
# block all interactive things from being indexed, such as posting requests
Disallow: /pkgbase/*
# block all account pages from being indexed, as they require login anyways
Disallow: /account/*
# block the cgit interface except for the useful things
Disallow: /cgit/aur.git/*
Allow: /cgit/aur.git/tree
Allow: /cgit/aur.git/log
Crawl-delay: 2
......@@ -109,6 +109,9 @@
- name: Copy aurweb configuration file
copy: src={{ aurweb_dir }}/conf/config.defaults dest={{ aurweb_conf_dir }}/config.defaults remote_src=yes owner=root group=root mode=0644
- name: Configure robots.txt
copy: src=robots.txt dest="{{ aurweb_dir }}/robots.txt" owner=root group=root mode=0644
- name: Install goaurrpc configuration
template: src=goaurrpc.conf.j2 dest=/etc/goaurrpc.conf owner=root group=root mode=0644
......
......@@ -51,6 +51,10 @@ server {
root {{ aurweb_dir }}/static;
index index.php;
location = /robots.txt {
alias {{ aurweb_dir }}/robots.txt;
}
# redirect /tu to /package-maintainer for external links
location ~ ^/tu($|/.*) {
return 301 https://aur.archlinux.org/package-maintainer$1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment