MDI HTTP Referer Block

描述

MDI HTTP Referer Block enables WordPress site owners to detect and control user experience based on the origin of traffic. By analyzing the HTTP referrer (both server-side via PHP and client-side via JavaScript when headers are missing), this plugin makes it easy to apply different behavior for visitors arriving from ads, social platforms, or syndicated search networks.

You can define specific referrer domains or patterns, and when a visitor matches those conditions, the plugin can:

  • Display a small notification (server-side) showing the detected referrer host or path.
  • Hide or reveal specific elements on your site using CSS selectors.
  • Redirect visitors from certain sources to a different URL.

This gives marketers, advertisers, and site owners fine control over how different audiences see the site.

Example use cases:

  • Hide contact forms when users arrive through syndicated search traffic to prevent spam or low-quality leads.
  • Hide pricing details when a user comes from social media to encourage engagement before pricing exposure.
  • Redirect visitors from affiliate networks to a dedicated landing page.
  • Show a simple banner confirming that the user arrived via a partner campaign.

The plugin sets a tracking cookie (mdi_syndicated_ref) to remember the detected source for the configured number of days, ensuring consistent visibility rules on repeat visits.

MDI HTTP Referer Block helps you tailor on-site experiences dynamically based on real visitor origin — simple, server-side controlled, and privacy-respecting.

For a full guide on blocking syndicated search traffic (e.g., Google Ads Performance Max), see:
https://mediuminteractive.com/how-to-block-syndicated-search-traffic-from-performance-max-campaigns-in-google-ads/

螢幕截圖

安裝

  1. Upload the mdi-http-referer folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Configure settings at: Settings HTTP Referer.

常見問題

Will this expose the full referrer URL publicly?

No. The plugin only outputs host and path in the notification to avoid leaking query parameters. Referrer data is sanitized.

Does the plugin support regex matching?

The client-side code treats configured domain strings as patterns and will try to use them as regex. Keep patterns simple (example: example\.com or partner.example).

評價

There are no reviews for this plugin.

貢獻者及開發者

“MDI HTTP Referer Block” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 MDI HTTP Referer Block 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0

  • Initial public release.