The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · HTML

Safely Open External Links

Shared by Hiral solanki · September 17, 2026

30 views
3 upvotes
Back to Snippets

Opens an external link in a new browser tab while using noopener noreferrer to prevent the new page from accessing the original window.

<a
    href="https://example.com"
    target="_blank"
    rel="noopener noreferrer"
>
    Visit Website
</a>
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

1 comment

  1. Amit Dholiya
    Amit Dholiya @amitdholiya

    This is a simple, reusable HTML snippet for safely linking to an external website. Breaking it down:

    Report

Proudly supported by