1

We would like to prevent pdf files from beeing indexed in our sulu 1.6 website. Apparently this works best, if pdf files have also a X-Robots-Tag: noindex attached to them.

Is there a way to configure or easily add additional http headers in sulu?

Thx a lot!

Christoph Kluge
  • 1,947
  • 8
  • 23
Andreas
  • 1,691
  • 1
  • 15
  • 34

1 Answers1

4

We found, that also architecture wise (seperation of concern) it will be better to solve this on the webserver level.

In our caddy:

header *.pdf {
  X-Robots-Tag "noindex, nofollow"
}

I also like it way better not to hijack sulu/symfony for this.

Update Feb/2020 Actually it turned out, that our webserver caddy is not as straight foreward as the above assumption. Caddy 2 can probably do it, but is not out jet.

We will investigate also a bit, weather we could upload pdf files to a specific folder instead of the dynamic delivery atm.

Andreas
  • 1,691
  • 1
  • 15
  • 34