• Resolved chrishajer

    (@chrishajer)


    Checking the response headers for my website shows this header:

    X-Pingback: https://www.example.com/xmlrpc.php

    I can’t figure out where it’s coming from. There is no line in my theme <?php bloginfo('pingback_url'); ?>. It’s not hard-coded in my theme’s header.php. I have the XML-RPC setting unchecked in Settings > Writing, and verified that the enable_xmlrpc option is zet to 0 in the wp_options table.

    I am using WP-Super Cache and I do notice that in the cache meta files I see this header along with the other headers. I suspect that’s just because the header is being sent and would be sent even if WP-Super Cache were turned off.

    Any ideas where this could be coming from? I’d like to remove it since I don’t use it for anything.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just place this filter into your themes functions.php an it gets removed:

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

    Thread Starter chrishajer

    (@chrishajer)

    Thank you very much for that, it works perfectly. I don’t know where the header is coming from, but this certainly removes it.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove X-Pingback: https://www.example.com/xmlrpc.php’ is closed to new replies.