How to disable WordPress Pingbacks & Trackbacks.

Let’s Know What is Pingback?

A pingback is a type of comment 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 blog, linking to Person A’s post. This automatically sends a pingback to Person A when both have pingback-enabled blogs.
  3. When Person A’s blog receives the pingback, it automatically goes to Person B’s post to confirm that the pingback originated there.

Let’s Know What 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 is necessary.

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

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 the following two options in your WordPress’s ‘Discussion’ settings

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

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

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

(Description: Check this box so WordPress can accept or decline the pings from other sites that 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: The above settings can be overridden for individual articles.

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

Put the following code in your .htaccess file 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 the above code only if you want to allow desktop and mobile weblog clients like WordPress or Blogger, i.e., Mobile clients like the WordPress App available on the App Store.

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

Allow from x.x.x.

Note: You should use 3 octets x.x.x. of your IP address instead of 4 octets x.x.x.x.

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 a weblog client like wordpress.com to post your articles remotely, add the following code to the 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 x.x.x.
#Allow from wordpress.com
</FilesMatch>

Happy coding…!!!

Why to disable WordPress Pingbacks & Trackbacks

Pingbacks sometimes slow down the time it takes to publish an article on an online WordPress blog. This feature causes unwanted spam in other people’s blogs without WordPress asking whether you want it or not, as it is enabled by default.

The other way around, Trackbacks will create spam in your comments feed from other blogs, i.e. Pingbacks sent to your blog from your peers. Trackbacks are old tactics used by bulk spammers worldwide, and they will make your blog bloated with unwanted and irrelevant comments and trackbacks.

Hope it helps,

Thanks & Regards
Mandar Apte

Published by Mandar Apte

Mandar is a Mumbai-based multi-disciplinary designer with UX/UI, Logo, Symbol, and Brand Identity design expertise. He currently runs his Mudrkashar Linguistic Apple iPhone, iPad, and Mac app business in the heart of Mumbai city.

Leave a comment

Leave a Reply