Open Links in a New Window – Why and How (2024)

Wait, where’d it go?! It was just here!

These are phrases you never want users of your website to think. But when a user clicks a link on your site and is kicked to a third party site without opening a new window or tab, you’re setting them up for frustration.

Here are some tips on when you should open links in a new window and how to do it on your website.

A Quick Note on Browsers

Whether a page opens in a new window or a new tab is dependent on each individual user’s settings. For the most part, modern browsers open pages in a new tab instead of a new window by default. Some older browsers are the opposite and open in a new window instead of a new tab. Since that’s largely out of your control as a website administrator, I’m using “new window” and “new tab” interchangeably throughout this post. Just want to make sure we’re all on the same page. So where were we…

Why Open Links in a New Window?

The main reason is simple: you want people to stay on your website. If a user clicks a link on your website and is taken off your site, there’s not a great chance they’ll take the time to navigate back. Sure, they may hit the Back button in their browser or retype your URL. But that’s all extra work for your user. It’s hard enough to get an interested visitor to your website in the first place. You should try to make their lives as easy as possible once they’re on your site.

Is It Ever Appropriate to Open a Link in the Same Window?

Of course it is. The idea of opening a link in a new window is not by any means a hard and fast rule. The best way to figure it out is to view each page with your user in mind. If you were a visitor to your website, would you expect the link to open in a new window or in the same window?

As a general rule, if the link is taking a user to another page on your website (a.k.a. an internal website link) it should probably open in the same window. If a link is taking a user off your site, open it in a new window.

How to Open Links in a New Window

Since the nuts and bolts of how to open a link in a new window vary widely based on the way your website is built, I’ll focus on how to do so in the most popular content management system out there, WordPress. We’ll also throw in good ol’ fashion HTML just for good measure.

Open Links in a New Window in WordPress

To open a link in a new window in WordPress, all you need to do is make sure you check the box beside “Open link in a new window/tab” when adding your link. It’s that simple. Now, as the name implies, your link will open in a new window or tab.Open Links in a New Window – Why and How (1)

Note: I’m using WordPress Version 3.3.1 for this demo. In an older version of WordPress yourdialoguebox likely will look different. If you see a dropdown menu, select the option that says “Open link in a new window” to achieve the same goal.

Open Links in a New Window in HTML

Chances are if you’re writing HTML you know how to do this, but I want to make sure I’ve got my bases covered. To get those links opening in a new window all you have to do is add a little code.

Original Link (opens in the same window)

<a href="http://www.wordpress.org/">WordPress</a>

Resulting Link: WordPress

New Link (opens in a new window once you add target=”_blank”)

<a href="http://www.wordpress.org/" target="_blank">WordPress</a>

Resulting Link: WordPress

Your link will now open in a new window.

Share Your Thoughts

What do you think? As a user, do you like or hate when links open in new windows? As a website administrator, do you tend to open your links in the same window or in a new one? We’d love to hear your thoughts.

Open Links in a New Window – Why and How (2024)

FAQs

Why are links opening in a new window? ›

There are several reasons why Google Chrome might be opening a new window each time you click a link instead of adding a tab to the existing window: Accidental keyboard shortcuts: Ctrl+click: By default, holding Ctrl and clicking a link opens it in a new window.

How do I force a link to open in a new window? ›

To open a link in a new window, you can use the target attribute within an anchor tag in HTML. Set the value of the target attribute to "_blank" to specify that you want the link to open in a new window. This code will create a link that will open "https://www.example.com" in a new browser window or tab when clicked.

Why should links open in a new tab? ›

However, for an improved user experience, opening external links in a new tab is generally considered a good practice. This ensures users can explore external content without leaving your site entirely, contributing to a positive user experience.

What are the reasons for not having links open in a new browser window? ›

Accessibility considerations

Having links open in a new tab or window is usually considered inaccessible. Here are some reasons why: Links opening in a new tab can be disorienting for people with low vision or who are navigating via screen reader, especially when there is no warning.

Top Articles
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 5653

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.