WordPress.org

Plugin Directory

Smart External Links Manager – new window, new tab, noopener, nofollow

Smart External Links Manager – new window, new tab, noopener, nofollow

Description

Take full control of your WordPress site’s links with Smart External Links Manager!

This powerful plugin ensures all external links open in a new browser window or tab, enhancing user experience and keeping visitors on your site longer. Built with SEO best practices and XHTML Strict compliance in mind, it offers a seamless integration for both users and search engines.

Its highly configurable settings panel allows you to precisely tailor link behavior to your needs. The core mechanism uses JavaScript to open links, the preferred method for XHTML 1.0 Strict compliance, avoiding target attribute modifications that could invalidate your markup. If JavaScript is disabled, links gracefully open in the current window.
Ideal for blogs, affiliate sites, magazines, and business websites that rely heavily on external links.

Key Features Include:

  • Automatic New Tab for External Links: Improve site engagement by default.
  • Optional Link Icon: Visually indicate links that open in a new tab with a customizable Dashicon or symbol (e.g., 🔗, ).
  • XHTML Strict Compliant: Uses JavaScript for window.open(), preserving markup validity.
  • Security First: Automatically adds rel="noopener" to all modified links.
  • SEO Enhancements:
    • UGC Ready: Works seamlessly with WordPress’s default rel=”ugc” on comment links, ensuring best practices for user-generated content.
    • Option to add rel="noreferrer" for enhanced privacy.
    • Option to add rel="nofollow" for specific link types.
    • Option to add rel="sponsored" for paid or affiliate links.
  • Granular Control with Lists:
    • Force List: Specify URLs or patterns (e.g., internal PDFs, specific pages) that should always open in a new tab.
    • Ignore List: Define URLs or patterns that should never open in a new tab, even if external (highest priority).
  • User-Friendly Settings: Intuitive interface to manage all options, including dynamic lists.
  • Lightweight & Efficient: Designed to be performant and not slow down your site. Dynamically processes new links added via AJAX.
  • Internationalization Ready: Easily translatable into any language.

Why Choose Smart External Links Manager?

  • User Experience: Keep users on your site while allowing them to explore external resources.
  • SEO Friendly: Proper use of rel attributes (noopener, noreferrer, nofollow, sponsored) without altering href for search engines.
  • Compliance: Adheres to XHTML Strict standards for modern web development.
  • Flexibility: Extensive configuration options to suit any website’s needs.
  • Developer Support: From the creator of NewCodeByte, with a commitment to quality and updates.

Future Enhancements Planned:
* Excluding specific links via CSS selectors.
* Advanced management for internal link behavior.
* And much more!

Support

If you need help or have a question, the best place to ask is the support forum on WordPress.org (once the plugin is listed).
You can also visit NewCodeByte for more information.

Found this plugin useful? Please consider leaving a ★★★★★ review!
Want to support future development? Buy me a coffee ☕!

Screenshots

  • The main settings page showing general options, including the “Display External Link Icon” option.
  • Managing the Force List with the dynamic item adder.

Installation

  1. Upload the smart-external-links-manager folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Configure the settings under Settings > Links Manager.

FAQ

Does this affect SEO?

This plugin is designed to be SEO-friendly. By using JavaScript to open links in a new tab and correctly managing rel attributes (like noopener, noreferrer, nofollow, sponsored), it doesn’t negatively impact SEO. The href attribute itself is not modified for search engine crawlers. Opening links in a new tab is primarily a user experience choice.

Why use JavaScript instead of target=”_blank”?

Using window.open() via JavaScript is the recommended method for XHTML 1.0 Strict compliance. Directly adding target="_blank" can invalidate strict markup. This JavaScript approach also allows for dynamic addition of window features like noopener and noreferrer effectively.

How does this plugin handle WordPress external links?

It automatically identifies external links on your WordPress website and uses JavaScript to open them in a new tab or window. The plugin also manages important SEO attributes like rel=”noopener”, “nofollow”, and “noreferrer”, giving you full control.

Can I customize which links open in a new tab?

Yes, you can use the Force List and Ignore List to specify URLs or URL patterns to always or never open in a new tab.

Can I choose a different icon for external links?

Absolutely! From the settings page, you can enable the “Display External Link Icon” option. Once enabled, a new dropdown menu will appear, allowing you to choose from a wide variety of Dashicons and modern Unicode symbols (like or 🔗) to best match your site’s style.

How does the plugin handle links in comments (UGC)?

The plugin is fully compatible with WordPress’s handling of User-Generated Content (UGC). By default, WordPress adds rel=”nofollow ugc”to links in comments. Our plugin respects this and applies its own rules on top, such as opening these links in a new tab. If you enable the “Add nofollow” option in the settings, it will ensure nofollow is present, harmonizing perfectly with WordPress’s SEO best practices.

Is this plugin compatible with caching and minification plugins?

Yes, it is lightweight and works well alongside most caching and optimization plugins.

What is the priority of Force/Ignore lists?

  1. Ignore List: Links matching patterns here will always open in the same tab.
  2. Force List: If not ignored, links matching patterns here will always open in a new tab.
  3. Default Behavior: If not in ignore or force lists, external links open in a new tab, internal links in the same tab.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Smart External Links Manager – new window, new tab, noopener, nofollow” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.2

  • New: Customizable Link Icons! You can now choose from a wide variety of Dashicons or modern Unicode symbols (like , ↪, 🔗) to perfectly match your site’s design. This feature is powered by a flexible JSON-based icon library.
  • New: Interactive URL/Pattern Lists. The “Force” and “Ignore” lists in the admin settings are now fully interactive. Easily add or remove entries without reloading the page for a much faster workflow.
  • Enhancement: Improved Admin Interface. The settings page has been reorganized for better clarity. The icon selection control is now dynamically shown or hidden based on the “Display Icon” setting.
  • Enhancement: Better Support & Guidance. The “Help & Support” section has been completely revamped with clearer explanations, a detailed guide on UGC link handling, and a new FAQ section in the readme file.
  • Dev: Code Refinements & i18n. Refactored and improved the rendering of admin option fields. All new strings are fully localizable.

1.1

  • New: Added an option to display a visual icon (Dashicon 🔗) next to links set to open in a new window/tab.
  • Enhancement: Implemented MutationObserver to process links added dynamically after page load (e.g., via AJAX).
  • Enhancement: Added frontend CSS file (welm-frontend.css) for icon styling.
  • Dev: Conditionally enqueues Dashicons stylesheet when the icon feature is active.

1.0

  • Initial stable release.
  • Opens external links in a new window/tab using JavaScript (XHTML Strict compliant method).
  • Adds noopener by default to new windows for security.
  • Configurable options:
    • Enable/disable plugin functionality.
    • Add noreferrer to window features for new tabs.
    • Add rel="nofollow" to links modified by the plugin.
    • Add rel="sponsored" to links modified by the plugin.
    • Force List: Specify URLs/patterns to always open in a new window.
    • Ignore List: Specify URLs/patterns to never open in a new window (overrides external/force).
  • User-friendly interface for managing Force and Ignore lists with AJAX-like behavior.
  • Admin settings page (Settings > Links Manager) with a comprehensive Guide & Support section.
  • Internationalization ready (.pot file included).