Open External Links in New Tab
Automatically open all external links in new browser tabs. When visitors click links to other websites, your site stays open in the original tab, making it easy for them to return.
Use Cases
- Keep visitors on your site while they explore referenced resources
- Reduce bounce rate by maintaining your page in an open tab
- Improve user experience by not navigating away unexpectedly
- Save visitors from using the back button repeatedly
How It Works
- Enable the module in Switchboard
- External links automatically get
target="_blank"added - Internal links (to your own site) are unaffected
- Security attributes (
rel="noopener noreferrer") are added automatically
Where to Find It
Location: This module works automatically on all frontend pages. No configuration needed.
What’s Modified
When the module detects an external link, it adds:
<!-- Before -->
<a href="https://external-site.com">Visit Resource</a>
<!-- After -->
<a href="https://external-site.com" target="_blank" rel="noopener noreferrer">Visit Resource</a>Link Detection
External Links (Modified)
Links are considered external if they:
- Start with
http://orhttps:// - Point to a different domain than your site
Examples:
https://google.com→ Opens in new tabhttps://external-blog.com/article→ Opens in new tabhttp://resource.org→ Opens in new tab
Internal Links (Unchanged)
Links are considered internal if they:
- Point to your own domain
- Use relative paths
- Don’t start with http/https
Examples:
/about-us/→ Opens in same tabhttps://yoursite.com/contact→ Opens in same tab#section→ Opens in same tab
Content Types Covered
| Content Type | Processed? |
|---|---|
| Post content | ✅ Yes |
| Page content | ✅ Yes |
| Comments | ✅ Yes |
| Widgets | Depends on widget |
| Navigation menus | No |
| Theme templates | No |
Existing Target Attributes
If a link already has a target attribute, it’s not modified:
<!-- This link keeps its original target="_self" -->
<a href="https://example.com" target="_self">Link</a>This lets you override the behavior for specific links when needed.
Security: noopener noreferrer
The module adds rel="noopener noreferrer" for security:
| Attribute | Purpose |
|---|---|
noopener | Prevents the new page from accessing your page’s window object |
noreferrer | Prevents the referrer header from being sent |
This protects against “reverse tabnabbing” attacks where malicious sites could redirect your page.
FAQ
Why not let visitors choose?
Many users don’t know they can Ctrl/Cmd+click to open in a new tab. This module provides a consistent, expected behavior for external links.Does this affect navigation menus?
No, navigation menus are processed differently by WordPress. To open menu links in new tabs, use the menu editor’s link target option.Will this work with page builders?
If the page builder outputs standard HTML links, yes. Most builders (Elementor, Beaver Builder, etc.) have their own “open in new tab” options for links.Can I exclude specific external links?
Addtarget="_self" manually to any link you want to keep in the same tab. The module respects existing target attributes.Is there an SEO impact?
No negative SEO impact. External links withnoopener noreferrer work normally for SEO purposes.What about affiliate links?
External affiliate links are treated like any other external link — they’ll open in new tabs, which is typically desirable for affiliate marketing.This module is a time-saver. Without it, you’d need to manually add target="_blank" to every external link. Now it happens automatically.
Some users prefer external links opening in the same tab. This is a design decision — use what works best for your audience.
Get access to all 147 modules with a single license