Title: Comments error (localhost) + comunication error
Last modified: March 3, 2021

---

# Comments error (localhost) + comunication error

 *  Resolved [chryses](https://wordpress.org/support/users/chryses/)
 * (@chryses)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/)
 * Hi, I have configured Jetpack to handle comments, so users can decide to use 
   facebook, google or other too.
    But if a comment is made, an error appears and
   redirects to a localhost address 127.0.0.2 I did some research and found that
   my provider had rules in .htaccess to limit access to the xmlrpc.php file, so
   I deleted them and now if I browse to this file, I get the right answer “XML-
   RPC server accepts POST requests only.” I also discovered that my provider does
   not use the php variable “REMOTE_ADDR”, so I added “$_SERVER[‘REMOTE_ADDR’] =
   $_SERVER[‘HTTP_X_FORWARDED_FOR’];” to the beginning of the wp-config.php file
   and, now in the “Site Health” summary, both “HTTP_X_FORWARDED_FOR” and “REMOTE_ADDR”
   show the visitor’s ip. However I still can’t add a comment, I also tried disconnecting
   and reconnecting jetpack but it doesn’t seem to work. Even Jetpack debugger can’t
   connect to the site, as error it returns “Communication error”. Does anyone have
   an idea what I can do to fix this problem?
 * J

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [MadHatter (a11n)](https://wordpress.org/support/users/madhattersez/)
 * (@madhattersez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/#post-14130445)
 * Could you share your site’s URL (domain) here, so we can have a look?
 * If you want it to remain private, you can also contact us via this contact form:
 * [https://jetpack.com/contact-support/?rel=support&hpi=1](https://jetpack.com/contact-support/?rel=support&hpi=1)
 * Thanks!
 *  Thread Starter [chryses](https://wordpress.org/support/users/chryses/)
 * (@chryses)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/#post-14130456)
 * Sure, is not yet completed but is not a problem
    [https://www.goccediveleno.it](https://www.goccediveleno.it)
   I’m trying different solutions too 😀
 *  Plugin Contributor [Dan (a11n)](https://wordpress.org/support/users/drawmyface/)
 * (@drawmyface)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/#post-14134305)
 * I’m not sure what would cause that. Your Jetpack connection looks fine currently.
 * There may be something else installed on the site that’s causing problems. The
   quickest way to figure out if something is interfering is to test for a theme
   or plugin conflict.
 * I know it’s less than ideal, but could you please try the following:
 * – Temporarily deactivate all the site’s plugins except for Jetpack and clear 
   your browser’s cache.
    – Then try commenting again. If it works, then we’ll know
   that another plugin is conflicting here. You can re-enable your plugins one by
   one, commenting in between, until you find the one causing the conflict. You 
   can leave it disabled or reach out to the plugin developer for a fix.
 * If disabling plugins doesn’t help, it may be the theme.
 * – Temporarily switch your theme to a WordPress default theme like [Twenty Twenty](https://wordpress.org/themes/twentytwenty/).
   Then try commenting again. If it works, then you know it’s a problem with the
   theme, and you can reach out to the theme developer for a fix.
 * Let us know how that goes.
 *  Thread Starter [chryses](https://wordpress.org/support/users/chryses/)
 * (@chryses)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/#post-14135591)
 * Hi, always thanks for your reply.
    Unfortunately, in both cases it didn’t work.
 * I’m definitely not an expert on WP, but as a computer geek I’m guessing it might
   be something related to some variable in jetpack and the server.
    Because if 
   I disable “Let visitors use a WordPress.com, Twitter, Facebook, or Google account
   to comment” then I am able to post a comment (the one you see on the blog was
   done so) What do you think? Can I post some configuration files or report some
   debug logs to help?
 *  Thread Starter [chryses](https://wordpress.org/support/users/chryses/)
 * (@chryses)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/#post-14136151)
 * Hi, I found the problem!
    Inside .htaccess there was this block of code
 *     ```
        RewriteCond %{REQUEST_URI} .(wp-comments-post)\.php*
        RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} !^([^@]*)@@https?://\1/.* [OR]
        RewriteCond %{HTTP_USER_AGENT} ^$
        RewriteRule ^(.*)$ http://%{REMOTE_ADDR} [R=301,L]
       ```
   
 * Directly from my web host, to prevent spam
 * Thanks a lot for your support

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Comments error (localhost) + comunication error’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [chryses](https://wordpress.org/support/users/chryses/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/comments-error-localhost-comunication-error/#post-14136151)
 * Status: resolved