How to Open External Links in a New Window or Tab with WordPress
August 28. 2020
Among all the things that you need to optimize, you might be wondering why should you bother with trying to open external links in a new window or tab. Surely opening external links regularly is good enough. And, at the end of the day, why is it important to have external links in the first place? Well, to help you understand the delicate reasons why opening external links in a new window or tab are essential, we are going to take a closer look at visitor behavior. Furthermore, we will address the key question of this article, which is how to optimize your WordPress so that it opens external links properly.
Why should you open external links in a new window or tab
The default setting that WordPress has for external links is to open them in the current window. While changing this setting might seem like a minor issue, it can actually have huge repercussions on your website. Keep in mind that your main goal while designing your website should be to keep people on it for as long as possible. But, if you only use internal links, you miss all the SEO benefits that external links provide. So, what are you to do? Well, simple. Optimize your WordPress so that it keeps the current window open while opening the external links in a new window or tab.
Why use a new window or tab to open links?
While it is great for your readers to follow your external links, you still want them to remain on your website. The more time they spend on your website, the greater the odds that they will hire your services. So, while you should add external links, you should also try to keep your readers anchored to your website. If you manage to do that, you will ensure that even after going through the external website, your readers will return to you. And the best way to achieve this is by optimizing WordPress to open external links in new windows or tabs.
How to prepare WordPress for external links
So, with all this in mind, how are you to optimize your WordPress so that it properly opens new links? Well, that depends. You can always hire trained professionals to help you with WordPress management. But, if it is for this single issue, you can try tackling them on your own. First, you need to consider which various on WordPress you are running (classic or Gutenberg). Then you need to consider what method you are going to use to implement the necessary changes to WordPress. And, finally, you need to choose whether WordPress will open external links in a new window or tab. So, we are going to try and cover all the common ways in which people deal with this common issue.
Using the new (Gutenberg) editor to open in new window
If you are using the Gutenberg editor in WordPress, opening external links in a new window will be a breeze. The block editor comes with a built-in feature that allows you to modify hyperlinks so that they open in a different window. To do so, you simply need to select the text that you want to link and then press the insert link button. Once the insert link popup shows, click on the down arrow button. This will give you the option to open the link in a new tab.
Using the classical editor to open in new window
If, on the other hand, you are using the classical version of WordPress, the procedure to set up external links is a bit different. You start off the same by selecting the text that you want to link and by clicking on the insert/edit link button in the top bar (or use Ctrl+K). A popup window will show where you will add your external link. In that window, you will see a button with a gear icon. By clicking on it you will bring up the advanced settings for links. There you will find an “Open link in a new tab” checkbox. Once you check it, simply click on the Update button.
Using HTML to open in new window
If you are familiar with the basics of HTML programming, opening an external link in a new window will be a joke. Simply open up your webpage in the text editor and add the link using the following code:
<
a
href
=
"http://externallink.com"
target
=
"_blank"
rel
=
"noopener"
>Link Text</
a
>
The “http://externallink.com” is simply our placeholder for your external link. In practice, you will put the name of the website here. How you will open the link is defined by the target parameter. If there is no parameter, the link will get opened in the current window. The “_blank” attribute makes it open in a new window or tab.
Using WordPress plugins to automatically open in new window
Any of the aforementioned methods will do you just fine if you are building up your website. But, if you already have a running website, it may be arduous to change so that every external link opens in a new tab or window. To fix this, you simply need to install one of the WordPress plugins. Some of them can even help you check and fix broken links. But, our advice is to get the “External Links in New Window / New Tab” plugin and install it. It is by far the easiest way to open external links in a new window or tab, without having to manually change each one.