Title: block external connection
Last modified: May 15, 2018

---

# block external connection

 *  [alexlii](https://wordpress.org/support/users/alexlii/)
 * (@alexlii)
 * [8 years ago](https://wordpress.org/support/topic/block-external-connection/)
 * Hi
 * Please check this url of wordpress official:
    [https://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder](https://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder)
 * Block External URL Requests
    Block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL
   as true and this will only allow localhost and your blog to make requests. The
   constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests.
   The format of the WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames
   to allow, wildcard domains are supported, eg *.wordpress.org will allow for all
   subdomains of wordpress.org to be contacted.
 * define( ‘WP_HTTP_BLOCK_EXTERNAL’, true );
    define( ‘WP_ACCESSIBLE_HOSTS’, ‘api.
   wordpress.org,*.github.com’ );
 * What I mean is that some external connections seems no related to function working,
   it is quite suspicious…
 * for security consideration, it would be great clearfy can detect and optionally
   block it.
 * Alex
    -  This topic was modified 8 years ago by [alexlii](https://wordpress.org/support/users/alexlii/).

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

 *  [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [8 years ago](https://wordpress.org/support/topic/block-external-connection/#post-10296964)
 * Hi,
    Please explain what kind of problem you are talking about.
 * How does this relate to the Clearfy plugin? Do you want to see these settings
   in the plugin?
 * Best regards, Alex
 *  Thread Starter [alexlii](https://wordpress.org/support/users/alexlii/)
 * (@alexlii)
 * [8 years ago](https://wordpress.org/support/topic/block-external-connection/#post-10299284)
 * yes.
 * There are always external connections in some plugins, these connections are 
   no related to the plugin function, and only purpose of these connections are 
   advertising or tracking and collecting data.
 * They cause site delay and insecurity.
 * That means there are no effects on the function of these plugins if disable these
   external connections, maybe white and black list would be great for adminitrator
   to check.
 * Maybe set block rules by the number connecting per day/ hour.
 *  [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [8 years ago](https://wordpress.org/support/topic/block-external-connection/#post-10309369)
 * Hi,
 * The idea is quite interesting, I added it to the list of interesting ideas to
   disable the not needed in WordPress.
 * I’m currently working on a very interesting update for WordPress privacy, maybe
   I’ll use your idea in this part of the project.
 * Thank you!
 * Best regards, Alex
 *  Thread Starter [alexlii](https://wordpress.org/support/users/alexlii/)
 * (@alexlii)
 * [8 years ago](https://wordpress.org/support/topic/block-external-connection/#post-10309439)
 * Hi Alex,
 * I am glad that you like this idea.
 * and here is a plugin for your reference:
    [https://wordpress.org/plugins/snitch/](https://wordpress.org/plugins/snitch/)
 * Alex
 *  [limdul](https://wordpress.org/support/users/limdul/)
 * (@limdul)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/block-external-connection/#post-10500287)
 * Blocking external connections/hosts is a native WordPress function.
 *     ```
       define('WP_HTTP_BLOCK_EXTERNAL', true);
       define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,*.github.com' );
       ```
   
 * see [wp-config Codex](https://codex.wordpress.org/Editing_wp-config.php#Block_External_URL_Requests)
 * hope this helps

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

The topic ‘block external connection’ is closed to new replies.

 * ![](https://ps.w.org/clearfy/assets/icon-256x256.gif?rev=2392119)
 * [Clearfy Cache – WordPress optimization plugin, Minify HTML, CSS & JS, Defer](https://wordpress.org/plugins/clearfy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/clearfy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/clearfy/)
 * [Active Topics](https://wordpress.org/support/plugin/clearfy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/clearfy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/clearfy/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [limdul](https://wordpress.org/support/users/limdul/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/block-external-connection/#post-10500287)
 * Status: not resolved