Webflow sync, pageviews & more.
NEW
Answers

How can I make all external links open in a new tab by default on my Webflow site, while keeping internal links opening in the current tab? Is there a solution that doesn't involve manually ticking a box for each link? Thank you!

Yes, there is a way to make all external links open in a new tab by default on your Webflow site, without manually ticking a box for each link. You can achieve this by using custom code.

Here are the steps to do it:

1. Go to your Webflow project and open the Designer.

2. Navigate to the page where you want to apply this behavior.

3. Select the "Pages" panel on the left side, and click on the gear icon for the page you want to edit.

4. In the "Custom code" section, add the following JavaScript code:

```javascript

```

This code uses jQuery to select all external links in the page and add the `target="_blank"` attribute to them, which makes them open in a new tab.

5. Save the changes and publish your site.

By adding this code to your Webflow project, all external links will now automatically open in a new tab. Internal links, on the other hand, will still open in the same tab.

It's worth mentioning that this is a global change, so it will be applied to all the pages where you've added this custom code. If you want to customize this behavior on a per-page basis, you can modify the JavaScript code accordingly.

Remember to test the behavior on different browsers to ensure it works consistently across all platforms.

Rate this answer

Other Webflow Questions