How to disable WordPress Pingbacks & Trackbacks, One of the old Feature & Core Functionality of WordPress, Optimum Performance Tip

Let’s Know, What is really Pingback is?

 
A pingback is a type of comment that’s created when you link to another blog post where pingbacks are enabled. The best way to think about pingbacks is as remote comments:

 

  1. Person A posts something on his blog.
  2. Person B posts on her own blog, linking to Person A’s post. This automatically sends a pingback to Person A when both have pingback enabled blogs.
  3. Person A’s blog receives the pingback, then automatically goes to Person B’s post to confirm that the pingback did, in fact, originate there.

 
Let’s Know, What is really Trackback is?

 
Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress blogs they’ll be notified automatically using pingbacks, no other action necessary.

 
Think of trackbacks as the equivalent of acknowledgements and references at the end of an academic paper or chapter in a text book.

 
To send a trackback, add the trackback URI from the other blog post to the Send Trackbacks module in your blog post before you publish it. A trackback URI from a WordPress blog will end with /trackback/.

 

Step 01: Disable following two options in your WordPress’s ‘Discussion’ settings

 
Option 01: Attempt to notify any blogs linked to from the article

 
(Description: If you check this box, WordPress will send out a ping to a site or article you have linked to in your post. Your mention of their site or article will show up in the comment section of their site, if that site allows pingbacks. The notification occurs during the process of publishing your article to the internet. An article with many hyperlinks will slow the posting process as WordPress contacts all of the sites before the post is published.)

 
Option 02: Allow link notifications from other blogs (pingbacks and trackbacks)

 
(Description: Check this box so WordPress to accepts or declines the pings from other sites which may reference your site or an article on your site. If this box is checked, pingbacks and trackbacks will appear in the comments section of your posts.)

 

Note: Above settings can be overridden for individual articles.

 

Step 02: Here is how to protect your website using .htaccess to reduce SPAM to totally disallow all weblog clients, pingbacks & trackbacks

 
Put following code in your .htaccess file available in your website’s root folder

 

#XML RPC Interface for weblog clients, Trackback & Pingback Protection
<FilesMatch "^(xmlrpc\.php|wp-trackback\.php)">
Order Deny,Allow
Deny from all
</FilesMatch>

 
Optional Step A: Remove ‘xmlrpc\.php|’ from above code to only if you want to allow desktop & mobile weblog clients like WordPress or blogger i.e. Mobile clients like ‘WordPress’ App available on app Store.

 
Optional Step B: If you want add your IP Address to allow list in above code then here is how to do it by adding below code to original code:

 

Allow from x.x.x.

 
Note: It is recommended that you use 3 octets x.x.x. of your IP address instead of 4 octets x.x.x.x of your IP address.

 
Now, Your code should look something like this:

 

#XML RPC Interface for weblog clients, Trackback & Pingback Protection
<FilesMatch "^(xmlrpc\.php|wp-trackback\.php)">
Order Deny,Allow
Deny from all
Allow from x.x.x.
</FilesMatch>

 
Optional Step C: If you want to allow weblog client like wordpress.com through which you can remotely post your articles then add following code to original code.

 

Allow from wordpress.com

 
Now, Your code should look something like this:

 

#XML RPC Interface for weblog clients, Trackback & Pingback Protection
<FilesMatch "^(xmlrpc\.php|wp-trackback\.php)">
Order Deny,Allow
Deny from all
Allow from wordpress.com
</FilesMatch>

 
Happy coding…!!!

 
Why to disable WordPress Pingbacks & Trackbacks

 
Pingbacks sometimes slow down your time it takes to publish one article on online WordPress blog. This feature will cause lot amount of unwanted SPAM in other’s blog without WordPress it self asking you want it or not as it is enabled by default.

 
And other way round Trackbcks will create SPAM in your comments feed from other’s blog i.e. Pingbacks send you to your blog from your fellow peers. Trackbacks are the old tactics used by bulk spammers this days over the world which will make your blog bloated with unwanted & unrelevant comments & trackbacks.

 
Hope it helps,

 
Thanks & Regards
Mandar Apte

Leave a Reply

Your email address will not be published. Required fields are marked *