WordPress Remove Emoji DNS Prefetch Without Plugin

WordPress remove emoji DNS prefetch is a tiny but neat optimization. By default, WordPress adds an emoji DNS prefetch link to your site’s header. Remove it with this tweak — no plugin needed!

Add this to your child theme’s functions.php file:


remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
remove_action( ‘wp_head’, ‘wp_resource_hints’, 2 );

How It Works

This WordPress remove emoji DNS prefetch snippet disables the emoji script, style, and the DNS prefetch resource hint. That’s one less external call on your page load.

Why WordPress Remove Emoji DNS Prefetch?

Most modern browsers don’t need WordPress’s emoji script. Removing the prefetch reduces unnecessary DNS lookups, making your site leaner and faster.

Common Mistake

Some themes or plugins might still load emojis. Test your frontend and make sure no unexpected icons break.

Pro Tip

Combine this with disabling other unneeded head elements for a cleaner source code.

Related Snippet

👉 Disable Dashicons For Non-Logged Users

Leave a Comment