Close Menu
    Facebook X (Twitter) Instagram
    • Download Cisco Packet Tracer
    Facebook X (Twitter) Instagram Pinterest Vimeo
    IT Beginner
    • Home
    • Server
    • WordPress
    IT Beginner
    Home»WordPress»Remove WordPress X-Pingback header
    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
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    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
    Tags
    apache centos Centos 6 cuda Desktop Environment dual boot environment featured gnome GUI hostname hosts intel kernel kill lamp server lemp server life MariaDB netflix nginx nvidia password php-fpm phpmyadmin pids processes s.m.a.r.t Security session solid state drive ssd ssh ssh server tag 1 tag 2 Ubuntu upgrade varnish VirtualBox VNC Server web server window manager wordpress xfce
    Facebook X (Twitter) Instagram Pinterest

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

    wpDiscuz