How to make sure all external links on your site open in a new tab

Posted By: Dylan Hunt

Published: November 28, 2016 02:13

I know its really annoying to add target="_blank" to every external link in your website, so I wanted to share this code you can use to make every link open in a new tab. Just put this code right above the closing tag in your theme.liquid. This guide is for Shopify, but you can modify it by replacing the {{ shop.url }} with your own URL.

Enjoy keeping people on your website longer!

Need help implementing any of these guides?

Contact Me