How to Enable Comments with Anti-Spam on Drupal 8?

Introduction: Drupal Core Comments + ReCaptcha & Disqus

This Tutorial will show how to enable Comments on content type nodes in Drupal 8, adding ReCaptcha anti-spam protection. D8 admins can add HoneyPot for anti-scriptBot protection. Optional: The Tutorial also includes installing the Disqus comments platform as an alternative to the Drupal 8 core comments system which may be advantageous to some web publishers. The Drupal 8 core module system cannot be used at the same time with Disqus comments. Disqus is a third-party start-up widget that plugs into the Drupal 8 CMS to extend functionality. Drupal 8 publishers will need to make a meta-decision as to whether to use Drupal 8 core comments with ReCaptcha anti-spam or install Disqus as a comment solution for any website.

Step One: Install the Drupal Comment System on Content

Start: Navigate to the modules section of Drupal 8 administration at admin/modules & enable the Comment module. Most Drupal 8 websites install with this enabled as the default setting. How to Enable Comments with Anti-Spam on Drupal 8?

Next: Comment settings can be turned on/off individually for each content type. Navigate to /admin/structure/types/manage/*/fields to edit the settings for each content type.

How to Enable Comments with Anti-Spam on Drupal 8? Advanced: Under the settings available at admin/structure/comment administrators can customize the theme settings for comments, building custom templates for different displays. How to Enable Comments with Anti-Spam on Drupal 8? Finish: Customize the Comment form settings & on-page display for each Drupal 8 content type individually according to the needs of your website’s theme, then add anti-spam protection.

Step Two: Install ReCaptcha Anti-Spam Protection on Forms

Start: Download and install the ReCaptcha anti-spam module for Drupal 8 comments. Administrators will need to register with ReCaptcha to use the module with Drupal 8. Required Downloads: Catcha:https://www.drupal.org/project/captcha ReCaptcha:https://www.drupal.org/project/recaptcha HoneyPot:https://www.drupal.org/project/honeypot

Note: The HoneyPot module adds an extra layer of protection against automated script-bots.

Configuration: Install & enable the three modules as usual in Drupal 8 administration, then navigate to admin/config/people/captcha/recaptcha in order to configure the ReCaptcha settings on comments & other forms. Configuration: The HoneyPot module can be configured by navigating to: admin/config/content/honeypot & enabling “Protect all forms” or Comment forms specifically. How to Enable Comments with Anti-Spam on Drupal 8? Configuration: Choose Comment forms from the list of options for HoneyPot protection. Configuration: The ReCaptcha service requires users to register every domain at: https://www.google.com/recaptcha/admin Configuration: Register your website with ReCaptcha, then enable ReCaptcha verification on comment forms in the administration section at: admin/config/people/captcha/recaptcha How to Enable Comments with Anti-Spam on Drupal 8? Configuration: Generate a ReCaptcha API key then enter the Site Key/Secret Key values in the module form. Choose the ReCaptcha theme color & difficulty level for user challenges. Finish: Save the settings and load a Drupal 8 page as anonymous in a browser. The ReCaptcha anti-spam challenge should display in comments for anonymous users but not administrators or site editors. The HoneyPot module functions automatically in the background.

Step Three: Review the Permission Settings for User Roles

Start: For web security & theme requirements, review the Permission settings for Comments according to User Roles in Drupal 8 admin at: admin/people/permissions How to Enable Comments with Anti-Spam on Drupal 8? Configuration: It is recommended to grant the permission to comment on nodes to registered users and not to anonymous users. Remember to review D8 website user registration settings. Finish: Grant the Comment permission to the required User Roles, then save the new settings. Anonymous users should see a “Register to comment” link to the sign-up page.

Step Four: Install Disqus Comments for Content Types

Optional: Some Drupal 8 web publishers may prefer to use the Disqus comment system on nodes instead of the default Drupal 8 core comment system with ReCaptcha anti-spam.

  • Advantages: Disqus is a professional comment system well recognized by users across many websites with shared login capabilities & independent comment mediation.
  • Disadvantages: The comment content is managed on Disqus web servers & off-site domain tools rather than through Drupal 8 administration & the local production server.

Note: In order to install Disqus comments on a Drupal 8 website, it is recommended to uninstall the Drupal core Comment module in administration (unless it is already in use with the forum module or other pre-requisites). Then download & install the Disqus module files, enabling them in the Drupal 8 administration section as usual. Otherwise, override the Comment settings on a node-by-node basis to use Disqus on some content types only.

Start:Disqus is a drop-in replacement widget for Drupal 8 core comments, but administrators will need to register their websites with Disqus at: https://disqus.com/admin/create/ Configuration: After registering the website, return to: admin/config/services/disqus How to Enable Comments with Anti-Spam on Drupal 8? Configuration: Add your website’s shortname, user access token, & secret/public keys to the Disqus module settings panel & save. Use Google Analytics to track comments as an option. How to Enable Comments with Anti-Spam on Drupal 8? Advanced: Use the domain tools at Disqus to moderate content: https://disqus.com/admin/ Finish: Navigate to node pages and test the Disqus module display. Drupal 8 administrators have the option to configure Disqus to display on any content type or let it degrade gracefully.

Conclusion: Disqus vs. Drupal 8 Core Comment System

Summary: Comments are a fundamental aspect of multi-user blogs, social networking, & e-commerce websites, requiring Drupal 8 web publishers to choose D8 core or Disqus. Recommendation: The Drupal 8 core comments system vs. Disqus debate involves advantages/disadvantages, i.e. theme professionality & off-site management of content data. Important: Use the ReCaptcha & HoneyPot modules together with core Drupal 8 comments for advanced protection against spam & script bots that can be customized in administration.

Check out these top 3 Drupal hosting services:

HostArmada
$1.79 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8
  • Want to get top recommendations about best hosting? Just click this link!

How To Find and Install A New Theme in Drupal 8

This tutorial will help you replace the default Drupal theme with your preferred
2 min read
Elizabeth Grom
Elizabeth Grom
Hosting Expert

How To Install and Manage Modules In Drupal 8

This article will help you find, download, and install Drupal 8 modules.
2 min read
Roman Frolov
Roman Frolov
Hosting Expert

How To Create Views in Drupal 8

This tutorial is compiled to help you create a view in your Drupal 8 platform.
3 min read
Elizabeth Grom
Elizabeth Grom
Hosting Expert

How to Create a Landing Page for Drupal Using Panels?

In this tutorial, we will build a Panels landing page for Drupal 8 with Views Bl
5 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top