Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Does DNN auto place the Meta Tag "Follow,Index"?Does DNN auto place the Meta Tag "Follow,Index"?
Previous
 
Next
New Post
1/4/2013 5:31 AM
 

Came across this issue a while ago and two solutions spring to mind.

1- Administrative type: Edit page properties and add header tag. Apparently the latter tag takes precedence.

2-Programmatically: Add module, skin-object, directly in skin or on default.aspx.cs (after logic for metarobots, do a chtrl find and place code after)

The logic goes any url or path you want not indexed add it to web-config e.g. <add key="MetaRobots" value="/db_lpt_1.aspx, /db_lpt_2.aspx,/join-now/ctl/" />

Example skinobject code:

Public Class _MetaRobots
        Inherits SkinObjectBase
        Private Shared siteExclusion As String = ConfigurationManager.AppSettings("MetaRobots")
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Try
                Dim pageurl As String = String.Format("{0}://{1}{2}{3}", Context.Request.Url.Scheme, Context.Request.Url.Host, If(Context.Request.Url.Port = 80, String.Empty, ":" + Context.Request.Url.Port), Request.RawUrl)
                Dim MetaRobots As System.Web.UI.HtmlControls.HtmlMeta = Me.Page.Header.FindControl("MetaRobots")
                If Not (String.IsNullOrEmpty(siteExclusion)) Then
                    Dim noIndexFollowPages As String() = siteExclusion.Split(",")
                    If Not noIndexFollowPages Is Nothing Then
                        Dim yes = noIndexFollowPages.AsParallel().[Single](Function(x) pageurl.Contains(x))
                        If Not String.IsNullOrEmpty(yes) Then
                            If Not MetaRobots Is Nothing Then
                                MetaRobots.Content = "NOINDEX, FOLLOW"
                            End If
                        End If
                    End If
                End If
            Catch ex As Exception
                'do nothing
            End Try
        End Sub
    End Class


 
New Post
1/6/2014 11:57 AM
 

We also have the problem with development websites being referenced, even if all the pages are hidden to the public, the URL (subdomain like test.mydomain.com) is referenced. It would be really practical to have the option to not index at a page level or entire portal level.

Does anyone has a trick to add header tag to an entire portal, without using the skin ?

 
New Post
1/6/2014 4:46 PM
 

 Hi,

From dnn 7.1 there is an option in the page setting to no index the page, which generate noindex meta.

Otherwise openurlrewriter integrate an option to generate noindex on the whole site with 1 checkbox.

http://Openurlrewriter.codeplex.com/

Regards

 
New Post
1/7/2014 6:03 AM
 
Thanks Sacha, it works fine !
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Does DNN auto place the Meta Tag "Follow,Index"?Does DNN auto place the Meta Tag "Follow,Index"?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out