November Happy Hour will be moved to Thursday December 5th.

Prevent indexing on specific document in FIND?

Vote:
 

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.

#280123
May 10, 2022 14:40
Anawilliam - Jan 03, 2023 20:27
There are a few ways you can prevent a PDF file from being indexed by search engines:

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
Vote:
 

Thanks!,

Is your solution JUST for pages and not specifically for a PDF file as required for my implementation?

#280212
May 12, 2022 0:38
Vote:
 

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; }
    }
}
#280215
May 12, 2022 6:40
Vote:
 

Thanks for this interesting information!

#280457
May 17, 2022 13:18
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.