I just added <meta name="googlebot" content="noindex">
in my site which produces a pdf file with MVC 5 and the file is no longer created.
Does anyone have any idea how the file can be created and at the same time not be indexed by Google?
Asked
Active
Viewed 29 times
1

Georgios Loudaros
- 21
- 4
1 Answers
1
PDF files can't use HTML meta tags. Instead you can use HTTP headers to prevent indexing. In MVC 5, the code for doing so would look something like:
context.Response.Headers.Add("X-Robots-Tag", "googlebot: noindex");

Stephen Ostermiller
- 23,933
- 14
- 88
- 109