Birthday

July 14, 2012 is TipRicks's Birthday, Please Prepare and Send Good Wishes to its team!

UnderStood
TipRicks is under maintenance! If you found any error please let us know. Contact Us ×

Hello!

Click one of our representatives below to chat on WhatsApp

Support Customer Service Center
+923084774257
You can also send us an email to support@tipricks.com
Hello! What can I do for you?
×
How can I help you?

How to Add Nofollow Links to WordPress Comments

SHARE:

For us, bloggers may sometimes feel furious when seeing many unimportant comments on our own blog. Moreover, the blog is open to anyon...

For us, bloggers may sometimes feel furious when seeing many unimportant comments on our own blog. Moreover, the blog is open to anyone and no less important is listed form to fill the website. The most likely thing to happen when they know the link in the comment is a DoFollow link. Is it harmful? Yes, it will be very detrimental when visitors enter comments in the form of spam, or comments that are not very useful.

How to Add a Nofollow Link

Before further discussion, let's discuss what is a Nofollow and Nofollow link so you can understand more.

What is Dofollow Link:

DoFollow links are links that can be crawled by search engines (such as Google). So if you put your blog link on a blog that has a DoFollow link, then you will get the profit your blog will be crawled or visited by Google bot, and it will give a back to the back side of your blog.

What is Nofollow Link:

Nofollow links are links that cannot be crawled (crawled) by search engines. This is the opposite of dofollow links.

When visitors who intend to spam or unclear comments know that your blog has a comment with a nofollow link, maybe they will discourage sending comments.

For default the link is shaped like the following code:

<a href="https://www.tipricks.com"> TipRicks </a>

The link is a link called dofollow link.

<a href="https://www.tipricks.com" rel="nofollow" > TipRicks </a>

The link above is a nofollow link marked with rel="nofollow"

Make a Nofollow Link in the Comments

Enter the code below in your theme's functions.php.

[<br />function nofollow($string) {<br />$string = str_ireplace(' rel="nofollow"', '', $string);<br />return $string;<br />}<br />add_filter('comment_text', 'nofollow');<br />]

The code above will change the default link to become a nofollow link. But this is only specific to visitors who enter the link on the website form. For example in sharing comments, if you enter your blog link on the website form then your name will be allowed to point to your blog.

Or you can use the following code.
[<br /> function add_nofollow_link( $link ) {<br /> return str_replace( '")\'&gt;', '")\' rel=\'nofollow\'&gt;', $link );<br /> }<br /> add_filter( 'comment_reply_link', 'add_nofollow_link' );<br /><br />]

The code above will replace all links that visitors enter into the comment to be nofollow links.

This article "How to Add Nofollow Links to WordPress Comments" is protected by




Was this article helpful?

Thanks! Your feedback will help us to improve our Services.

COMMENTS

BLOGGER
Need help? Contact to our support center at +92 308 477 4257
Name

Agriculture PPT Templates,2,AI Tools,1,Amazon,1,AskTipRicks,9,Blogger,48,Blogger-SEO,6,Blogger-Templates,1,Blogger-Tutorials,32,Blogger-Widgets,11,Blogging-Tips,7,Books,1,Business,1,Computer PPT Templates,1,Computer-Tutorials,1,Creative-PowerPoint-Templates,2,Digital Marketing,1,Domain,1,Ecommerce,1,Facebook,4,Free-Mobile-Data,1,Freenom,1,General,7,Google-Adsense,4,Google-Analytics,2,Google-Classroom,3,Instagram,2,Internet,1,Interviews,1,Islamic PPT Templates,1,jQuery,1,Marketing,1,Medical PPT Templates,1,Microsoft-Word,3,Mobile-Marketing,1,Motivation,1,MS Word,1,News,25,News-Updates,26,Oppo-Mobile-Features,1,PDF,1,PowerPoint-Templates,7,Resume-Templates,2,Reviews,3,SEO,8,Social-Media,6,Tech-News,15,TrueCaller,1,Twitter,1,Videos,24,Vlogging,1,Web-Hosting,1,Whatsapp,3,WordPress,8,WordPress-SEO,1,WordPress-Themes,1,WordPress-Tutorials,4,Youtube,5,
ltr
item
TipRicks Blog: How to Add Nofollow Links to WordPress Comments
How to Add Nofollow Links to WordPress Comments
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLqestWO__Ts4aLEVPLefcu-1eJqpg03eiGAn98h6rJ7KGF6gIU9mIE-M8w7UtXEJdZXMyyJKHoWCYPDHFg8-nW0T7PR8KOAZKgBOfg1yDTBQ0rmNniosaHBjW86GSEY-Ud2upcwnbFm_s/s640/how-to-add-nofollow-links-to-wordpress-comment.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLqestWO__Ts4aLEVPLefcu-1eJqpg03eiGAn98h6rJ7KGF6gIU9mIE-M8w7UtXEJdZXMyyJKHoWCYPDHFg8-nW0T7PR8KOAZKgBOfg1yDTBQ0rmNniosaHBjW86GSEY-Ud2upcwnbFm_s/s72-c/how-to-add-nofollow-links-to-wordpress-comment.jpg
TipRicks Blog
https://blog.tipricks.com/2020/04/how-to-add-nofollow-links-to-wordpress-comment.html
https://blog.tipricks.com/
https://blog.tipricks.com/
https://blog.tipricks.com/2020/04/how-to-add-nofollow-links-to-wordpress-comment.html
true
7070217950916442682
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy