Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
695 views
in Q2A Core by
reopened by
where to add  rel="nofollow" link to the login?to=* and register?to=* in all question pages?
Q2A version: 1.8.1

2 Answers

0 votes
by
selected by
 
Best answer

you should no use nofollow, you should use noindex for internal links that you dont want to be indexed.

https://searchengineland.com/googles-matt-cutts-nofollow-attributes-on-internal-links-dont-hurt-but-dont-do-it-173128

even you dont need to do noindex as well because google will exclude login?* and register?* links as contents are exactly same.

but if you still want to do it go to your qa-theme-base.php find public function head_metas().

under it put this

$to = qa_get('to');

if( ($this->template === 'login' ||  $this->template === 'register') && isset($to) ) {

$this->output('<meta name="robots" content="noindex, nofollow" />');

} else {

$this->output('<meta name="robots" content="index, follow" />');

}

by
yes, better to add this,  or google webmaster center will show crawl error urls.
0 votes
by
/qa-include/app/format.php

find "qa_insert_login_links" and add rel="nofollow" to the below links.
...