sandywp / plugins / open-external-links-in-a-new-window

External Links in New Window / New Tab

4.5 out of 5 stars. 4.5 77 reviews

Open external links in a new window or new tab. SEO optimized and XHTML Strict compliant.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v1.45 30,000+ installs WP 4.0+ PHP 5.2+

your-sandbox.sandywp.com/wp-admin
External Links in New Window / New Tab running inside a SandyWP sandbox

What you get inside

1 screen
  • External links settings

About this plugin

Opens external links in a new tab or a or new window. You can set URLs that should either be forced to open in a new window or ignored.

The plugin produces XHTML Strict compliant code and is search engine optimized (SEO).
This is done using JavaScript’s window.open()-function. It adds only a few lines of vanilla JavaScript to the page, and does not require any external libraries like jQuery.

Most other plugins perform a hack by altering the target parameter (i.e. <a href="http://somewhere.example" target="_blank">). That method is not XHTML Strict compliant.
This plugin handles the links client-side, which lets search engines follow the links properly. Also, if a browser does not support JavaScript, the plugin is simply inactive, and does not result in any errors.

If you need a more advanced plugin, with more options try our free WP External Links plugin.

Credits
Inspired by the Zap_NewWindow plugin by Tom Köhler.
The banner is a photo by Monja Da Riva.

Translations
Danish by Kristian Risager Larsen
Dutch by Paul Staring
Lithuanian by Vincent G
Other translations will be appreciated!

Known bugs
The plugin conflicts with other plugins that change the links’ `onClick´ attribute.

Original developer
Kristian Risager Larsen – kezze.dk

Questions

How to disable this plugin?

Just use standard Plugin overview page in WordPress admin section and deactivate it or rename plugin folder /wp-content/plugins/open-external-links-in-a-new-window over FTP access.

How can I report security bugs?

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.

4.5

77 reviews

  • 5 ★ 67
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 3
  • 1 ★ 7

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.