Title: Cookies for Comments
Author: Donncha O Caoimh (a11n)
Published: <strong>6 Tháng 3, 2008</strong>
Last modified: 4 Tháng 6, 2019

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://s.w.org/plugins/geopattern-icon/cookies-for-comments.svg)

# Cookies for Comments

 Bởi [Donncha O Caoimh (a11n)](https://profiles.wordpress.org/donncha/)

[Tải về](https://downloads.wordpress.org/plugin/cookies-for-comments.0.5.5.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/cookies-for-comments/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/cookies-for-comments/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/cookies-for-comments/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/cookies-for-comments/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/cookies-for-comments/)

## Mô tả

This plugin adds a stylesheet or image to your blog’s html source code. When a browser
loads that stylesheet or image a cookie is dropped. If that user then leaves a comment
the cookie is checked. If it doesn’t exist the comment is marked as spam.
 The plugin
can also check how long it took a user to enter a comment. If it’s too fast it’s
probably a spam bot. How fast can a legitimate user enter their name, email, web
address and enter a well thought out comment?

For the adventurous, add these lines to your .htaccess and it will block spam attempts
before they ever get to WordPress. Replace the Xs with the cookie that was set in
your browser after viewing your blog. You can also find the cookie value by examining
the page source code and looking for “css.php?k=XXXXXXXXXXXXXXXXXXX”. Make sure 
the lines go above the standard WordPress rules.

    ```
        RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
        RewriteRule ^wp-comments-post.php - [F,L]
    ```

If you use WordPress MU, replace wp-comments-post.php above with wp-signup.php to
block spam signups.

    ```
        RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
        RewriteRule ^wp-signup.php - [F,L]
    ```

## Cài đặt

Copy into your plugins folder and activate. If you are using a caching plugin such
as [WP Super Cache](http://ocaoimh.ie/wp-super-cache/) make sure you clear the cache
after enabling this plugin.

## Hỏi đáp

  The cookie isn’t being set by the plugin. Why?

If you use wp-minify make sure you add the Cookies for Comments CSS file to the 
list of CSS files that shouldn’t be minified.

## Đánh giá

![](https://secure.gravatar.com/avatar/6b6828d80a4b959f8584a331032769c86ceb4f3b40267c4573569b1caaca6c69?
s=60&d=retro&r=g)

### 󠀁[Great plugin! The most effective to avoid spam since years](https://wordpress.org/support/topic/great-plugin-28627/)󠁿

 [Annonnimmo](https://profiles.wordpress.org/annonnimmo/) 9 Tháng 8, 2021

(REVIEW UPDATED August 2021) Based on my long experience, I think this the simplest,
fastest e most effective plugin to avoid spam in WordPress comments. I'm using this
plugin on several sites, since years, and it works like a charm. Also on a big website
with thousands of daily views (using .htaccess) P.s. It works very well with all
versions of WP 5.x

![](https://secure.gravatar.com/avatar/603cca234b548c60f97319853a2c9e29b918aa330e0fdc73bb92fa79edb59431?
s=60&d=retro&r=g)

### 󠀁[Must have, if you don’t use any other spam filters!](https://wordpress.org/support/topic/must-have-if-you-dont-use-any-other-spam-filters/)󠁿

 [Pothi Kalimuthu](https://profiles.wordpress.org/pothi/) 12 Tháng 1, 2017

If you don't use any other spam filter plugins, then you can rely on this to stop
spam comments for sure!

![](https://secure.gravatar.com/avatar/17d2043019570721f73f656763ed3e4503560d4e67fce26f4bf63011ba2505bc?
s=60&d=retro&r=g)

### 󠀁[Awesome!](https://wordpress.org/support/topic/awesome-3196/)󠁿

 [Spitt](https://profiles.wordpress.org/spitt/) 3 Tháng 9, 2016

There used to be 2 types of anti-spam plugins. The first one will block all comments,
and also block shopping carts if you run a site where people need to pay. The second
doesn't work. There is now a 3rd category, and this one not only works, but also
will not block shopping carts. This anti-spam works well with Clickbank and WP eMember
possibly other carts as well. Thank you so much! The last update stopped the anti-
spam from Tips and Tricks HQ with their WP Security plugin, and I was inundated 
with 100s of spam comments per day. Now, this solution works, and everything is 
sent to spam, without messing with my shopping cart. Thank you so much. mmoexploiters.
com

![](https://secure.gravatar.com/avatar/58b2bfa27ebaad09eb8eb06ac13ae6979ff61b6b0bd7eade993ff93a51baf70f?
s=60&d=retro&r=g)

### 󠀁[very easy and no more spam!](https://wordpress.org/support/topic/very-easy-and-no-more-spam-2/)󠁿

 [Donna McMaster](https://profiles.wordpress.org/mcdonna/) 7 Tháng 2, 2017

I'd been getting a dozen spams a day on two of my sites. We installed "Stop Spam
Comments" on one and "Cookies for Comments" on the other. Both worked perfectly.
No more spam. Thanks!

 [ Đọc tất cả 17 đánh giá ](https://wordpress.org/support/plugin/cookies-for-comments/reviews/)

## Người đóng góp & Lập trình viên

“Cookies for Comments” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ Donncha O Caoimh (a11n) ](https://profiles.wordpress.org/donncha/)
 *   [ Automattic ](https://profiles.wordpress.org/automattic/)

[Dịch “Cookies for Comments” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/cookies-for-comments)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/cookies-for-comments/), 
check out [SVN repository](https://plugins.svn.wordpress.org/cookies-for-comments/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/cookies-for-comments/)
qua [RSS](https://plugins.trac.wordpress.org/log/cookies-for-comments/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 0.5.5

 * Sanitize the cookie key before setting it. Props Matt Cutts and @planetzuda

#### 0.5.4

 * Added a rejection message for when people trip over the cookie protection.
 * Plugin requires WordPress 3.1+ now.

#### 0.5.2

 * Use an image to deliver cookie as well as stylesheet.
 * Don’t load WordPress to set the cookie. Makes pageload much faster!
 * Added “time to post comment” to comment notification emails.
 * Support for SSL sites.
 * If user is logged in don’t check for cookie.
 * Speed spammer checks to stop smarter bots and human spammers.

#### 0.5.1

 * Generate cfc_key all the time if it’s missing, not just on serving the css html
 * Added MU signup form mod_rewrite rules to docs and admin page
 * Added Settings page link to plugins page.
 * Add explanation text to css file.
 * Add docs on how to use CFC to protect the MU signup form
 * Show htaccess rules on admin page.
 * Don’t let wp-super-cache cache this page.
 * Store cfc_key in sitemeta for WordPress MU sites
 * Added mod_rewrite rules to block spam comments before they get to WordPress

## Meta

 *  Phiên bản **0.5.5**
 *  Cập nhật lần cuối **7 năm trước**
 *  Số lượt cài đặt **10.000+**
 *  Phiên bản WordPress ** 3.1 hoặc cao hơn **
 *  Đã kiểm tra lên đến **5.2.29**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/cookies-for-comments/)
 * Thẻ
 * [comments](https://vi.wordpress.org/plugins/tags/comments/)[cookies](https://vi.wordpress.org/plugins/tags/cookies/)
   [spam](https://vi.wordpress.org/plugins/tags/spam/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/cookies-for-comments/advanced/)

## Đánh giá

 4.9 trên 5 sao.

 *  [  17 5-star reviews     ](https://wordpress.org/support/plugin/cookies-for-comments/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/cookies-for-comments/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/cookies-for-comments/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/cookies-for-comments/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/cookies-for-comments/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cookies-for-comments/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/cookies-for-comments/reviews/)

## Những người đóng góp

 *   [ Donncha O Caoimh (a11n) ](https://profiles.wordpress.org/donncha/)
 *   [ Automattic ](https://profiles.wordpress.org/automattic/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/cookies-for-comments/)