Remove DNS-Prefetch Links Without Plugin

Removing DNS-Prefetch from wp_head hook is a pretty easy task. Just add the following code snippet to your functions.php to remove DNS-Prefetch links on your header;

// Remove dns-prefetch Link from WordPress Head (Frontend)
remove_action( 'wp_head', 'wp_resource_hints', 2 );

Leave a comment

Your email address will not be published. Required fields are marked *