Pingbacks are a type of notification in WordPress that lets you know when someone links to your blog posts.
Similarly, self pingbacks happen when you link to your own posts. This can flood your comments section with unnecessary notifications, which can be annoying and hard to manage.
We learned long ago that self pingbacks don’t help our users and clutter the comment moderation queue. That’s why we disable them on all our websites.
In this tutorial, we will teach you how to easily disable self pingbacks in WordPress. We will also discuss pingbacks in general and why disabling them is generally a good practice.
What Is a Pingback?
Pingbacks are a way to communicate between websites. They are almost like remote comments. Think of it like this:
- We write a post on the 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 be able 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. If one of your posts links to another post, then WordPress will send a “self pingback.”
For more details, look at our guide about trackbacks and pingbacks.
Why Disable Self Pingbacks in WordPress?
We studied how users interacted with pingback links on different websites and discovered that they were not clicked very often.
However, when we added the same link directly in the article, users clicked on it much more.
Adding internal links to the body of the article also has a massive impact on the SEO. Internal linking helps search engines build relationships between different pages and establishes your expertise and authority on different topics.
As you add more internal links to your site, pingbacks will clutter your WordPress comment moderation queue. This can be annoying if you do not approve those pingbacks.
That’s why we disable self pingbacks on all our websites and focus on building internal links that are more helpful for our users and SEO.
Let’s look at how to easily disable self pingbacks in WordPress:
Disable Self Pingbacks in WordPress Using Plugins
Several plugins let you disable self pingbacks in WordPress. We will show you three of them, and you can choose one that works for you.
1. Disable Self Pingbacks Using WPCode (Recommended)
This method is easier and recommended for most users. WPCode is the best WordPress code snippets plugin.
It allows you to easily add custom code in WordPress without breaking your site. It also comes with a ton of handy custom snippets that you may want to use on your site.
First, you need to install and activate the WPCode plugin.
Note: A free version of WPCode is also available. However, to unlock the plugin’s full potential, we recommend upgrading to the paid version.
Once you have activated the plugin, go to the Code Snippets » +Add Snippet page. In the search box, type in ‘self pingback’, and it will show you the code snippet.
Click on the ‘Connect to Library to Unlock’ button.
This will open a popup where you can sign into your WPCode account and connect to the cloud library feature. Don’t forget to check the ‘Enable pushing snippets from the library to your site’ option.
If you don’t already have an account, then you can create one for free.
Connecting to the WPCode library gives you access to its library of free code snippets. You can also save and reuse your code snippets on your other websites.
Once connected to the WPCode library, return to Code Snippets » +Add Snippet page. In the search box, type in ‘self pingback’, and click ‘Use Snippet’ when the code snippet shows up.
The plugin will then open the code in a code snippet editor.
Here, the custom code snippet is automatically added. Simply toggle the status switch from ‘Inactive’ to ‘Active.’
Don’t forget to click ‘Update’ to save your changes.
That’s all. Your WordPress website will now start using this custom code to disable self pingbacks.
2. Using No Self Pings Plugin
For this method, you will be using a plugin made for one task only.
You need to do is install and activate the No Self Ping plugin. The plugin works out of the box and will disable self pingbacks upon activation.
Want to disable pingbacks for some other sites you own as well? Simply head over to the Settings » Discussion page and scroll down to the bottom.
Here, you can add any additional websites that you don’t want to pingback. These can be other websites you manage or any third-party websites you frequently link to.
Finally, don’t forget to click ‘Save Changes’ to store your settings.
3. Using Disabler Plugin
Another way to disable self pingbacks in WordPress is by using the Disabler plugin. It is explicitly made to disable unwanted features in WordPress.
First, you will need to install and activate the Disabler plugin. Upon activation, visit the Settings » Disabler page and switch to the ‘Backend’ tab.
From here, check the box next to the ‘Disable self pings’ option. Below that, you can provide any additional URLs that you don’t want to pingback.
Don’t forget to click on the ‘Save Settings’ button to save your changes.
Turn Off Self Pingbacks Without Using a Plugin
If you do not want to use a plugin, 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. This option disables the pingback feature completely on your site.
Simply go to the Settings » Discussion page. In the ‘Default post settings’ section, uncheck the box next to the ‘Attempt to notify any blogs linked to from the post’ option.
Lastly, click on the ‘Save Changes’ button to store your settings.
WordPress will now stop sending pingbacks to any website when you link to it.
2. Manually Insert Code to Disable Self Pingbacks
This method is essentially the same we described earlier in the WPCode section.
Instead of a ready-to-use code snippet, you can manually add the code snippet to your website.
This method could also be useful for users who don’t want to use WPCode plugin. For more details, see our tutorial on how to add custom code snippets in WordPress.
You need to simply copy and paste this code into WPCode. Alternatively, you can add it to your theme’s functions.php file or a site-specific plugin:
add_action( 'pre_ping', function( &$links ) {
$home = get_option( 'home' );
foreach ( $links as $l => $link ) {
if ( 0 === strpos( $link, $home ) ) {
unset( $links[ $l ] );
}
}
} );
Don’t forget to save your changes and upload them to your site.
Once you have added this code, WordPress will stop sending pingbacks when you add an internal link.
Better Alternative to Self Pingbacks
The initial goal of adding pingbacks in WordPress was to enable communication between websites through links. However, spammers misuse them so much that most websites disable receiving trackbacks from other sites.
If you haven’t already, please take a look at our tutorial on how to disable trackbacks and pings in WordPress. It will save your website from a ton of unwanted spam.
Self pingbacks are pings to your own blog posts. For example, when you add a link to an older blog post, then a link to your new article will appear in its comment section.
However, the links appear at the bottom and don’t provide users with any context. We tracked those links and learned that users didn’t interact with them and that they didn’t add much value.
Instead, adding links in the article body worked much better. More users clicked on those links, increasing page views and boosting search rankings.
How to Add Links to Older Articles
We recommend that users make internal linking a habit and make it a part of their WordPress editorial workflow.
For our sites, we routinely update old articles with new information and add internal links pointing to newer articles when relevant.
We also use All in One SEO for WordPress, which is the best WordPress SEO plugin on the market. It also comes with a powerful linking tool called Link Assistant.
It allows you to track all links on your site, including internal links.
You will also see linking opportunities where the plugin will use AI to show you places where you can add new internal links.
For more details, see our detailed internal linking guide for beginners.
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 stop WordPress trackback spam or our tips for customizing the WordPress admin dashboard.
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.
Syed Balkhi
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Siva Mahesh
Very helpful article. Finally able to disable to wierd feature of wordpress.
WPBeginner Support
Glad our article was helpful
Admin
N.L Tayoh
Very helpful article. The self-pingbacks were getting on my nerves already. Following this guide really help out.
WPBeginner Support
Glad our guide was helpful
Admin
Aurora
Does the code only disable self-pings? What if I want to alert other blogs except my own?
WPBeginner Support
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
Hi , can you please help me find the functions.php file. I wanted to try the paste the code option.
Thank you
WPBeginner Support
Hi Aditi,
functions.php file is a template inside your current WordPress theme. You can find it under Appearance » Editor page.
Admin
Aditi Bisen
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
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
Really helpful, self pingback is annoying
Prasanna Sutrave
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
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.
Thanks for this post! You probably have the best answers that are always straight to the point!!
Heidi Pungartnik
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
Thanks for the kind words.
Admin
sneha
Is this code update works with wordpress multisite network to disable sub pingbacks set for posts?
Samir
Excellent, had no idea about pingbacks. I understand this is about Articles, but does this also apply to Products created in Woocommerce sites?
Donna
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
Yes, it hasn’t been updated in a while but the plugin works fine and is compatible up to WordPress 4.3.
Admin
Simon
Even tested it out on my site, works fine with WordPress 5.4.1
Acadia on My Mind
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
No it has no affect on your site’s SEO.
Admin
Acadia on My Mind
Thanks for the answer! Will disengage the auto ping back now that I know it doesn’t matter.