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 Disable Self Pingbacks in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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.

Disable Self Pings

What is a Pingback?

Pingbacks give softwares the ability to communicate between websites. Its almost like remote comments. Think of it like this:

  1. We write a post on 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 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.

Self Pingbacks on a WordPress site

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

Subscribe to WPBeginner

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.

Disabler plugin settings page

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.

Disable all outgoing pinbacks from your site

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.

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 says

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

      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

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

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

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

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

  7. sneha says

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

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

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

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

Leave a Reply to N.L Tayoh Cancel 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.

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.