adding nofollow to some links

Topics: Customizing Orchard
Dec 20, 2011 at 1:36 AM

specifically the /Users/ links (for login/logout) - I have these blocked in robots.txt already, but google is still angry with me for some reason. I'd like to add rel=nofollow specifically to the login link at the bottom of the page. Quick pointers on best way to do this?

Dec 20, 2011 at 9:13 AM

What do you mean exactly by "google is angry with me"?

You can override the User.cshtml shape from Core\Shapes\Views to change this but I'm sure I've see sites with login/register links in their google sitemap.

Dec 20, 2011 at 1:34 PM

well im getting an error right now in webmaster tools, warning that an important page is being blocked in my robots.txt. This page is the login page. I have everything under /Users/ blocked so google will stop trying to index it all (makes a big mess out of search results, and don't want it in there anyway).

I'd like to also nofollow the link from every page for "sign in"... since it is dofollow, i think google is assigning a lot of importance to the link.

i do have a sitemap but it does not include these login page(s)


Dec 20, 2011 at 2:06 PM

Well I already told you how to override the relevant template.

Dec 20, 2011 at 2:07 PM

right, thanks, just adding some extra documentation for future reference. And perhaps a request that we add this as a standard feature sometime later ;)



Dec 20, 2011 at 2:12 PM

I assume if there's a "dofollow" that a decision was made at some point that the link should be indexed...

Dec 20, 2011 at 2:16 PM

That's not quite how it works... google assumes all links are dofollow unless otherwise notified.

orchard really does need some way of telling google not to follow the signin links, because they are making a mess of search results. the return path url appended to the login url creates what google thinks is a whole new url for *every page on your site*. Thus for one site i have with 10 pages, each login url is creating an extra 10 urls that google indexes.. and reduces the quality of the content of the site.


Dec 20, 2011 at 2:23 PM

Hmm, I see ... not good. (Although, Google does assign less weight overall to pages generated from query parameters). One way to improve things might be to not include the returnUrl, and have a Javascript intercept append it lazily. Or use the Referrer value instead. Or have an Ajax login dialog :)

Dec 20, 2011 at 2:25 PM

right those would work. for right now, adding nofollow would probably be the simplest ;)

Dec 20, 2011 at 5:16 PM

Right now, and if no other counter argument is given, I would agree to add a nofollow to this link. Can you open a bug for that ?

Dec 20, 2011 at 5:20 PM

will do

Dec 20, 2011 at 7:34 PM