Linking to your own posts also known as interlinking is great for SEO. However with pingbacks enabled on your site, interlinking posts can become annoying because WordPress automatically creates new pingback for that post. These pingback appear in the comments section of your posts. While some users may like this feature, many users don’t find it useful. In this article, we will show you how to disable self pingbacks in WordPress.
What is a Pingback?
Pingbacks give softwares the ability to communicate between websites. Its almost like remote comments. Think of it like this:
- We write a post on WPBeginner blog.
- Then you write a post on your blog mentioning/linking to our article.
- Your blogging software (WordPress) will automatically send us a pingback.
- Our blogging software (WordPresS) will receive the ping. It will then automatically go to your blog to confirm that the pingback originates there (check if the link is present).
- Then we will have the ability to display your pingback as a comment on our post. This will solely be a link to your site.
Pingbacks also work within your site. So if one of your posts link to another post, then your WordPress will send a self-ping. This can get really annoying.
Fore more details, take a look at our guide about trackbacks and pingbacks.
Now that you know what is a pingback, let’s take a look at how to disable self pingbacks.
Video Tutorial
If you don’t like the video or need more instructions, then continue reading.
There are multiple ways you can disable self pingbacks on your WordPress site. We will show you both plugin method and manual code method.
Disable Self Pingbacks in WordPress Using Plugins
There are two plugins that you can use to turn off self pings.
1. Using No Self Pings Plugin
First thing you need to do is install and activate the No Self Pings plugin. The plugin works out of the box, and there are no settings for you to configure. Simply activating the plugin will turn off self pingbacks.
You will notice that No Self Pings plugin hasn’t been updated for more than two years. Usually we do not recommend installing plugins that haven’t been updated this long. Simply because in most cases those plugins do not work. However, No Self Pings is very simple plugin, and it works even with the latest version of WordPress (4.2.3 At the time of writing this article).
We recommend you to read our guide on the issue of installing plugins not tested with your WordPress version.
2. Using Disabler Plugin
Simply install and activate the Disabler plugin. Upon activation, visit Settings » Disabler page to configure the plugin.
You will notice that the plugin allows you to turn off several WordPress features. You need to scroll down to Back End Settings section and check the box next to Disable self pings option.
Click on the save changes button to store your settings.
Turn Off Self Pings Without Using a Plugin
If you do not want to use a plugin, then you can use these two methods to turn off self pings on your site.
1. Turn off Pingbacks Globally
WordPress allows you to turn off pingbacks on your site. By using this option will disable pingback feature completely on your site.
Simply go to Settings » Discussion page. Under the Default article settings section, uncheck the box next to ‘Attempt to notify any blogs linked to from the article’ option. Click on the save changes button to store your settings.
2. Manually Insert Code to Disable Self Pingbacks
If you are comfortable with adding code snippets to your WordPress theme files, then you can use this method to switch off self pings.
Simply copy and paste this code in your theme’s functions.php file or a site-specific plugin.
function no_self_ping( &$links ) { $home = get_option( 'home' ); foreach ( $links as $l => $link ) if ( 0 === strpos( $link, $home ) ) unset($links[$l]); } add_action( 'pre_ping', 'no_self_ping' );
That’s all, we hope this article helped you disable self pings on your WordPress site. You may also want to check our guide on how to put a stop on WordPress trackback spam.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Siva Mahesh says
Very helpful article. Finally able to disable to wierd feature of wordpress.
WPBeginner Support says
Glad our article was helpful
Admin
N.L Tayoh says
Very helpful article. The self-pingbacks were getting on my nerves already. Following this guide really help out.
WPBeginner Support says
Glad our guide was helpful
Admin
Aurora says
Does the code only disable self-pings? What if I want to alert other blogs except my own?
WPBeginner Support says
Hi Aurora,
Yes, it only disables self pings. However, you will need to make sure that the option to notify other blogs when you link to them is checked on “Settings » Discussion” page.
Admin
Aditi Bisen says
Hi , can you please help me find the functions.php file. I wanted to try the paste the code option.
Thank you
WPBeginner Support says
Hi Aditi,
functions.php file is a template inside your current WordPress theme. You can find it under Appearance » Editor page.
Admin
Aditi Bisen says
Hi,
Thank you for your reply. I think I’m just silly, still cannot find it.
Are the steps you suggested possible with the free version of WordPress?
or do I need to be signed in to one of the paid plans.
Thank you.
WPBeginner Support says
Hi Aditi,
These instructions are for self-hosted WordPress.org websites. Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
muhammed hasnul banna says
Really helpful, self pingback is annoying
Prasanna Sutrave says
I had unchecked the box from Discussion setting.
Still, I have to use any No Self Pingback Plugin?
Is it essential to use a plugin for No self Pingback?
Please Reply.
Thanks
stancho says
i have all pingback features disabled but i want to know how to prevent other blogs from generating pingback linking to my site?
Victor S. says
Thanks for this post! You probably have the best answers that are always straight to the point!!
Heidi Pungartnik says
You guys rock. Every time I google for a super niche, obscure issue, I find your site and a simple, step-by-step guide to dealing with the issue. I love this site. Keep it up!
WPBeginner Support says
Thanks for the kind words.
Admin
sneha says
Is this code update works with wordpress multisite network to disable sub pingbacks set for posts?
Samir says
Excellent, had no idea about pingbacks. I understand this is about Articles, but does this also apply to Products created in Woocommerce sites?
Donna says
I just went to the site to check out the recommended plug in and got this message–Should we be concerned:
his plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
WPBeginner Support says
Yes, it hasn’t been updated in a while but the plugin works fine and is compatible up to WordPress 4.3.
Admin
Simon says
Even tested it out on my site, works fine with WordPress 5.4.1
Acadia on My Mind says
Found your blog mentioned in Feedfront magazine, and glad to come across this article. Does disabling self ping backs affect SEO? If so, is it worth taking that step?
WPBeginner Support says
No it has no affect on your site’s SEO.
Admin
Acadia on My Mind says
Thanks for the answer! Will disengage the auto ping back now that I know it doesn’t matter.