AI OnAI Off
Thanks!,
Is your solution JUST for pages and not specifically for a PDF file as required for my implementation?
Hey
This will also work with Media type so just add this checkbox on your medaitype
[Display(
GroupName = Global.GroupNames.MetaData,
Order = 100)]
[CultureSpecific]
public virtual bool DisableIndexing { get; set; }
Like this-
namespace Test.Models.Media
{
[ContentType(DisplayName = "PdfFile", GUID = "458d11ea-4aaf-4847-a343-abc0507ce301", Description = "")]
[MediaDescriptor(ExtensionString = "pdf,doc,docx,rtf,xlsx,xls,csv,txt,json")]
public class DocumentFile : MediaData
{
[Display(Name = "Title", Order = 1, GroupName = SystemTabNames.Content)]
public virtual string Title { get; set; }
[UIHint(UIHint.Textarea)]
[Display(Name = "Description", Order = 2, GroupName = SystemTabNames.Content)]
public virtual string Description { get; set; }
[Display(
GroupName = Global.GroupNames.MetaData,
Order = 100)]
public virtual bool DisableIndexing { get; set; }
}
}
The business wants to post a PDF on our public website so another part of the business can have an unauthenticated link to instructions for external contractors that don't have access to our systems.
Both them and the owners of the website prefer it doesn't show up in search results. Is there a way to prevent a file from being indexed??
In other CMS tools I've used the search will not index any file that is not linked from content pages but this obviously isn't how FIND works.
Use a noindex meta tag: You can add a noindex meta tag to the HTML page that displays the PDF file. This will tell search engines not to index the page or follow any links on the page. To do this, you will need to add the following tag to the head section of the HTML page:
Use the X-Robots-Tag HTTP header: You can also use the X-Robots-Tag HTTP header to tell search engines not to index the PDF file. To do this, you will need to add the following header to the HTTP response when the PDF file is requested: X-Robots-Tag: noindex