WordPress adds a DNS-Prefetch meta tag pointing to s.w.org in your site’s HTML source. This tag is a WordPress identifier that CMS detection tools can use to confirm your site runs WordPress. WP Ghost can remove it with a single toggle. Alternatively, you can remove it with a code snippet in functions.php.

What Is DNS-Prefetch?

What DNS-Prefetch is and why the WordPress s.w.org prefetch tag reveals your CMS identity

Remove DNS-Prefetch with WP Ghost

  1. Go to WP Ghost > Tweaks > Hide Options.
  2. Switch on Hide WordPress DNS Prefetch Meta Tag.
  3. Click Save.
WP Ghost Tweaks Hide Options showing the Hide WordPress DNS Prefetch Meta Tag toggle

Only the WordPress DNS-Prefetch is removed. WP Ghost removes the s.w.org prefetch tag specifically. DNS-Prefetch tags from other plugins, themes, or services are not affected. Your site’s loading speed is not impacted because the s.w.org prefetch is only used for WordPress emoji resources.

Remove DNS-Prefetch with Code

If you prefer a code approach (or don’t use WP Ghost for this), add the following to your child theme’s functions.php file or a code snippets plugin:

add_action('init', function() {
    remove_action('wp_head', 'wp_resource_hints', 2, 99);
});

The code approach removes all resource hints. Unlike WP Ghost’s toggle (which removes only the WordPress s.w.org prefetch), the code above removes all DNS-Prefetch, preconnect, and prefetch resource hints from your site. This may affect loading speed if your site relies on DNS-Prefetch hints for CDN, font, or analytics domains. The WP Ghost toggle is more precise.

Frequently Asked Questions

Will removing DNS-Prefetch slow down my site?

No. The WordPress s.w.org DNS-Prefetch is only used for loading emoji resources. If you’ve already disabled WordPress emojis (which WP Ghost can do at WP Ghost > Tweaks > Disable Options > Disable Emojis), the prefetch serves no purpose. Even with emojis enabled, the performance impact of removing this single prefetch is negligible.

Does this affect DNS-Prefetch from other services?

WP Ghost’s toggle removes only the WordPress s.w.org tag. DNS-Prefetch tags from Google Fonts, CDN services, analytics, or other plugins are not affected. The code approach is broader and removes all resource hints, which may include prefetch tags from other services.

Does WP Ghost modify WordPress core files?

No. WP Ghost uses WordPress hooks to remove the DNS-Prefetch tag from the HTML output. No core files are modified.

Hiding WordPress identity signals: