[Koha] Sitemap

Tomas Cohen Arazi tomascohen at gmail.com
Tue Nov 10 01:41:32 NZDT 2020


When you run:

   $ koha-sitemap --enable <site>
   $ koha-sitemap --generate <site>

It will generate the sitemap-related files in /var/lib/koha/<site>/sitemap

You shouldn't be looking at a sitemap.xml, but a sitemapindex.xml file like
this:

https://donum.numismatics.org/sitemapindex.xml

In our case, we put a reference to it in a robots.txt file:

Sitemap: https://donum.numismatics.org/sitemapindex.xml
User-agent: Googlebot
Disallow: /cgi-bin/koha/opac-search.pl
Disallow: /cgi-bin/koha/opac-export.pl
User-agent: *
Disallow: /

Our current practice is to store this file in the instance's dir
(/var/lib/koha/<site>/robots.txt)
And you need to point it in your apache config:

   <Location /robots.txt>
      SetHandler None
      Require all granted
   </Location>
   Alias /robots.txt /var/lib/koha/<site>/robots.txt


Good luck!



El dom., 8 nov. 2020 a las 16:17, Michael Kuhn (<mik at adminkuhn.ch>)
escribió:
>
>
> Hi Victor
>
>  > In which koha folder should I insert the sitemap.xml?
>  > I inserted in the folder / usr / share / koha / opac / htdocs
>  > more when I type https: //meusite/sitemap.xml the sitemap.xml code is
>  > not displayed
>  > What is the correct procedure?
>
> Did you ever get an answer to your question?
>
> When some years ago I generated a Koha sitemap using the Perl script
> "sitemap.pl" (according to
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11190) this
> created the file "/usr/share/koha/opac/htdocs/sitemapindex.xml" and the
> file "/usr/share/koha/opac/htdocs/sitemap0001.xml" containing the URLs.
>
> But no file "sitemap.xml".
>
> Hope this helps.
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W www.adminkuhn.ch
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha



--
Tomás Cohen Arazi
Theke Solutions (http://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F


More information about the Koha mailing list