Close Menu
    Facebook X (Twitter) Instagram
    • Articles
    • How it Works
    • Our Story
    • Contact Us
    Facebook X (Twitter) Instagram Pinterest Vimeo
    IT Beginner
    • Home
    • Blog
      • Happiness
      • Productivity
      • Leadership
    • About us
    • Contact us
    IT Beginner
    WordPress

    Remove WordPress X-Pingback header

    25/07/2017Updated:25/07/2017No Comments2 Mins Read

     

    WordPress Pingbacks/trackbacks is sort of link management, it lets you to know if someone make a linkback or said something about your post on his blog, and the same thing happen when you make a link to someone blog, pingbacks/trackbacks will let that person know you are linking to him. WordPress does that automatic via XML-RPC Pingback.

    wordpress nam huy linux blogIf you are using WordPress, WordPress will use XMLRPC to pingbacks, trackbacks which may cause your website into serious security problem. Few months ago more than 162000 WordPress Sites are used for (DDOS) Distributed Denial of Service Attack, and leaves millions of Sites Exploitable for DDoS Attacks. I believe most WordPress sites enable Pingback by default, and Pingback can be used as as indirect source amplification

    To remove WordPress X-Pingback header

    First you will need to login into your WordPress Admin Panel, then “Appearance”, and “Editor”. click on Theme Functions or functions.php file. Add this code to the end of functions.php file.

    function remove_x_pingback($headers) {
    
        unset($headers['X-Pingback']);
    
        return $headers;
    
    }
    
    add_filter('wp_headers', 'remove_x_pingback');

    To prevent Pingback Denial of Service

    Add this to .htaccess if you use Apache web server

    <Files xmlrpc.php>
    
    Order Deny,Allow
    
    Deny from all
    
    </Files>
    Add this to your website nginx.conf file if you use Nginx as web server
    location = /xmlrpc.php { deny all; }
    Finally add these lines to your current WordPress theme’s functions.php file
    add_filter( ‘xmlrpc_methods’, function( $methods ) {
    
    unset( $methods['pingback.ping'] );
    
    return $methods;
    
    } );

    To stop WordPress to notify pingback to other website and receive trackback from other websites. Go to WordPress Admin Panel, then “Settings”, and “Discussion”, Uncheck

    • Allow link notifications from other blogs (pingbacks and trackbacks)
    • Attempt to notify any blogs linked to from the article
    pingback trackback
    Previous ArticleHow to install XAMPP 1.8.3 with PHP 5.5.11 on Centos Sever
    Next Article How to remove PHP X-Powered-By & Nginx Version

    Related Posts

    Tips – Tricks

    Optimize WordPress with Nginx

    04/08/2017
    CentOS

    How To Install WordPress with nginx on Centos 6

    02/08/2017
    WordPress

    WordPress Admin Panel URL

    25/07/2017
    Subscribe
    Notify of
    guest

    guest

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    • Productivity
    • Leadership

    No posts

    No posts

    Subscribe to Newsletter
    Our Socials
    • Instagram
    • Facebook
    • Twitter
    • YouTube
    • LinkedIn

    Archives

    • April 2025
    • May 2024
    • March 2023
    • July 2022
    • March 2022
    • July 2020
    • January 2019
    • August 2018
    • July 2018
    • August 2017
    • July 2017
    • September 2016

    Categories

    • Business
    • CCNA 1 Instructor Materials
    • CentOS
    • Database
    • Debian
    • Fedora
    • Firefox
    • Happiness
    • Hardware
    • ICND1 Labs
    • ICND2 Labs
    • Leadership
    • Linux Essentials
    • Linux Mint
    • Marketing
    • My SQL
    • Netflix
    • Networking
    • Productivity
    • Resources
    • Security
    • SEO
    • Server
    • Social Media
    • Software
    • Tips – Tricks
    • Ubuntu
    • Uncategorized
    • User Experience
    • WordPress
    • Xubuntu

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna accumsan in scelerisque.

    Facebook X (Twitter) Instagram Pinterest

    Type above and press Enter to search. Press Esc to cancel.

    wpDiscuz