Add rel="nofollow" to Pagination Links

Google & BingBot are hitting our site hard with pifragment in the querystring. How can we add rel="nofollow' to pagination URLs?

Parents Reply
  • Nice! Please share if you figure out how to get this working. It'd be a huge help since we're in the same boat with Google and Bing.

    To try to combat this, I removed a bunch of our "paginated" widgets, like the Forum - Thread List, and replaced them with Activity Streams, but apparently (according to coworkers who are helping with this) the back-end request to "load more" functions very similar, just the front-end URL doesn't change, so it doesn't seem to have helped.

Children
  • I sure will. The biggest issue now is figuring out what that default tempalte is. Its not listed anywhere in the documentation.

  • I found these two pages that may help:  evolutionPager jQuery Plugin &  page UI Component 

    They have this code reference/example (I think it's the same in both examples)

    template: typeof options.configuration.Template !== 'undefined' ? options.configuration.Template : '' +
                    ' <% foreach(links, function(link, i) { %> ' +
                    '     <% if(link.type === "first") { %> ' +
                    '         <a href="<%: link.url %>" class="first" data-type="first" data-page="<%= link.page %>" data-selected="false"><span>«</span></a> ' +
                    '     <% } else if(link.type === "previous") { %> ' +
                    '         <a href="<%: link.url %>" class="previous" data-type="previous" data-page="<%= link.page %>" data-selected="false"><span><</span></a> ' +
                    '     <% } else if(link.type === "page") { %> ' +
                    '         <a href="<%: link.url %>" class="page<%= link.selected ? " selected" : "" %>" data-type="page" data-page="<%= link.page %>" data-selected="<%= link.selected ? "true" : "false" %>"><span><%= link.page %></span></a> ' +
                    '     <% } else if(link.type === "next") { %> ' +
                    '         <a href="<%: link.url %>" class="next" data-type="next" data-page="<%= link.page %>" data-selected="false"><span>></span></a> ' +
                    '     <% } else if(link.type === "last") { %> ' +
                    '         <a href="<%: link.url %>" class="last" data-type="last" data-page="<%= link.page %>" data-selected="false"><span>»</span></a> ' +
                    '     <% } %> ' +
                    '     <% if(i < (links.length - 1)) { %> ' +
                    '         <span class="separator"></span> ' +
                    '     <% } %> ' +
                    ' <% }); %> '
    
      

    I'm not sure how'd you drop that into the list.vm (I'm guessing maybe add a new file in the widget and call that file in $pagerOptions or $core_v2_ui.Pager?), but it seems like that's building the URLs, and maybe you could drop the rel="nofollow" into those <a> tags? 

  • I discovered this as well and was able to update my theme.js file to reflect the nofollow! Thanks for the tips to get this accomplished