Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Disable Self Pingbacks in WordPress (Step by Step)

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.

Turning off self-pingbacks in WordPress

What Is a Pingback?

Pingbacks are a way to communicate between websites. They are almost like remote comments. Think of it like this:

  1. We write a post on the WPBeginner blog.
  2. Then, you write a post on your blog mentioning/linking to our article.
  3. Your blogging software (WordPress) will automatically send us a pingback.
  4. 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).
  5. 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.”

Pingback preview

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.

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.

WPCode's homepage

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.

WPCode connect library

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.

Connect code library

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.

Use snippet

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.’

Activate snippet

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.

No Self Pings settings

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.

Disabler prevent self-pingbacks

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.

Disable pingbacks globally

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.

All in One SEO - Link Assistant overview

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.

The Linking Opportunities list in AIOSEO

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

25 CommentsLeave a Reply

  1. 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!

  2. Siva Mahesh

    Very helpful article. Finally able to disable to wierd feature of wordpress.

    • WPBeginner Support

      Glad our article was helpful :)

      Admin

  3. 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

  4. 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

  5. Aditi Bisen

    Hi , can you please help me find the functions.php file. I wanted to try the paste the code option.
    Thank you

      • 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.

  6. muhammed hasnul banna

    Really helpful, self pingback is annoying

  7. 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

  8. stancho

    i have all pingback features disabled but i want to know how to prevent other blogs from generating pingback linking to my site?

  9. Victor S.

    Thanks for this post! You probably have the best answers that are always straight to the point!!

  10. 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!

  11. sneha

    Is this code update works with wordpress multisite network to disable sub pingbacks set for posts?

  12. Samir

    Excellent, had no idea about pingbacks. I understand this is about Articles, but does this also apply to Products created in Woocommerce sites?

  13. 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 :)

  14. 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?

      • Acadia on My Mind

        Thanks for the answer! Will disengage the auto ping back now that I know it doesn’t matter.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.