How to Open External Links in a New Tab on Your WordPress Site

This post may contain affiliate links, which means I will receive compensation if you click through and make a purchase.

How to open external links in a new tab | Sharing links on your blog is great, but do we really want to drive people away from our blogs? Of course not! By forcing a link to open in a new tab, you can make it easy for people to come back where they left off. Click through for the tutorial!

When adding links to your WordPress site, the best practice is to open external links in a new tab. Why? Well you’re directing people away from your site never to return again. However, if you have the link open in a new tab (or window), once they’re done, your site will still be open and waiting for them. You want them to come back and keep clicking, don’t you?

I thought so.

Now there are a few different methods you can use to open your external links in a new tab, depending on where on your site they’re located.

In this post, I’m going to show you:

How to open WordPress navigation links in a new tab

If you have a custom link in one of your WordPress menus, you can allow it to open in a new tab by doing the following:

Go to Appearance > Menus, select the menu and then click on the menu item in question, Do you see a checkbox labeled “open link in new tab?” If so, great! Click it then save your changes.


Now odds are you won’t see this little checkbox so we have to enable it. To do so, scroll up to the top of the page. See the tab titled “screen options” in the upper right corner of your screen? Click on it and a panel will open. Look for the “link target” box and check it. If you scroll down to your menu, the checkbox for opening the menu item in a new tab should have appeared. Check it, and you’re good to go!


Sidenote: Once you enable this option, you shouldn’t have to enable it again. It’ll automatically be there whenever you go to add a new link to your menu.

How to open links in your posts/pages in a new tab via the visual editor

As far as links in posts and pages go, opening a link in a new tab is pretty straightforward. In the visual editor, highlight the text you want to turn into a link. Enter the link into the link field and then click on the cog wheel. The link panel will appear. Check the box labeled “open link in a new tab.”



How to use HTML to open your links in a new tab

Now if you’re a fan of the text editor or if you’d rather go in and manually make a link open in a new tab, add target="_blank" to your link, like so:

In addition to working in your posts and pages, this will probably be your go to method for links in other areas of your site, such as text widgets, custom fields, or pretty much any where you can’t access the visual editor.

How to open all external links in a new tab

Now that you know how to set your external links to open in a new tab, what about all those other links in post archives? Do you really have time to check and edit each and every link? I’m guessing that’d be a no.

Luckily there’s a plugin available that will automatically open all external links in a new tab. No more going back and editing links. No more trying to remember to set it up in the first place. Simply install the plugin and you’re good to go!

Here’s how to set it up:

Go to Plugins > Add New. Search for “Open external links in a new window.” It should be the first search result (hint: it’s this one). Click install now then activate plugin. That’s it! Your external links should now automatically open in a new tab when clicked.


There you have it: how to open external links in a new tab. I just want to mention that while you may want to go crazy and set each and every link on your blog to open in a new tab, that’s only going to annoy your readers. Keep it only to links that take people away from your website.

Need some development help?

119 thoughts on “How to Open External Links in a New Tab on Your WordPress Site”

  1. Pingback: Saturday Sharing - bears, bras, and more - The Geeky Shopaholic

  2. Pingback: 8 Blogging rules everyone needs to follow - The Geeky Shopaholic

  3. Hi Allyssa,

    Interesting article this. And thanks for the same.

    Would like to know whether there is a way to open the posts within the “Recent Posts” tab thru a simple left click, rather than with a right click and choosing the option ‘open in new tab’?

    Thanks again,


    1. Off the top of my head, I’m not sure. That would probably require opening all links in a new tab, since the recent posts are internal links (vs external). There should be a plugin out there that can do that.

  4. Found your blog when I thought to myself, “shouldn’t all my blog post links open in a new window?”

    I found the plugin you list. I also found this one, which has 50% more downloads and has been more recently updated: WP External Links (nofollow new tab seo) — WordPress Plugins

    Any preference, one over the other? Would the “on the fly” slow down load time? Would it work with CDN? I guess same question with the one you recommend…

    Thanks again for the informative post!

    1. I not familiar with the one you mentioned, so I really can’t chime in on which one is better. The one listed in the post is just one I’ve used on client sites. You can always test this one out. Either choice should be fine though. And they both should work with CDN, but not 100% positive. The on the fly feature could potentially slow down a site, but I really don’t think it would make much of an impact.

  5. Pingback: How to Open External Links in a New Tab on Your WordPress Site – The Climate Zone

  6. On our blog we are using the repub hub to post some articles. We use the free version so we have to copy and paste the html into a new post. That plugin doesn’t work with that. Guessing cause it’s the html. Is there no default setting in WordPress to do this?

  7. Pingback: Ainda acha que é preciso ser magra pra ser sexy? Conheça a modelo plus size que foi capa da Vogue! – GLOBAL STREET FASHION

  8. Thank you very much. I’ve been clicking and ticking the “Open new tab” option for all of my links. This plugin saves me tons of time. From Mingeek with love.

    1. Oh yeah me too. I got trouble with this because each post on my blog has 4-5 outlinks. That’s real pain to click & check each link. Anyway good blog you are having!

  9. With that plugin it opens up my links in a new tab, but also the original page goes to the link as well. Any idea why? I looked on the WP plugin site and others have flagged this issue as well, but there is no answer or fix.

  10. Hi Allyssa

    Thanks for the very clear explanation. While the plugin may work for old links, I want to change future links. Do you know if there is a way to change the default setting so that all future links will default to open in a new tab?

    Thanks in advance for any advice which you might provide.


  11. Excellent! – very easy to follow and appreciate the images. They make it easy peasy. It’s so simple but easy to miss if you didn’t know about the screen options. Usually I never think of looking in there.

  12. Pingback: Decision Decisions … – Design Computer Blog

    1. Unfortunately it looks like the plugin only opens external links in a new tab. To open page titles, you’d need a plugin that would open all links in a new tab. Doing a quick search, I was unable to find any plugins with that functionality. That doesn’t mean that it doesn’t exist, but you might have to do some searching to find one.

  13. I have lot of Products which must be imported with wp all import. Can I add a code or something else so that the Products-redirect works on click from Shop Page to an external site with a new tab? I found a way with the Plugin “redirect by custom field”. But the links are opening in same window. PLS HELLLPPPP!!!

    1. I’m not sure that’s possible. It might be, but I can’t say for sure. You might need to try a different plugin or see if there are settings that need to be configured to get them opening in a new tab.

  14. Thank you!! I’ve been trying to get my custom menu link to open in a new tab for ages and now it finally works! Thank you thank you. 🙂

  15. Seriously, thank you! I just published a post with a boat-load of links in it and then realized that not a single on opened in a new tab. Your article is EXACTLY what I was looking for.

  16. Allyssa, i’m probably the newest css newbie on the planet and after spending a couple of hours trying to figure the theme codes and css i came across your post. Your “Open external links in a new window” plugin suggestion solved my problem in under 1 minute! Thank you so very much!!

  17. Hello, thanks for the plugin! I’d like for only the links with .mp3, .pdf, and .mid extensions to open up in new tabs. What is the regular expression for indicating those three file types? I’ve done quite a bit of research, but couldn’t find the answer to that question.


    1. Unfortunately I don’t think you can specify by file type. If it’s possible, I’d say maybe there’s a way to do it with Javascript, but I’m not familiar enough with it to say. Sorry I can’t be of more help!

  18. First, second people’s thanks for this helpful info.

    Second, to clarify: This nifty plugin won’t work with the free WP (.com) blogs, right?

    1. The first three steps in this post show you how to do it without a plugin. Unfortunately there’s no way to open all external links in a new tab without a plugin.

  19. Raymond Helfrich

    Thank you, thank you, thank you, for helping me to know about the “link target” option in the “screen options”! (I wanted to make a custom URL open in a new tab.) Thank you, thank you, thank you!

  20. Hi Allyssa,
    Excellent post and certainly helpful. Blogs like these are worthwhile and definitely worth reading. It´s taken me ages to finally find a solution and this was easy to follow and implement. I´ll look forward to reading your others posts.

  21. Hello Allyssa,

    Really Awesome Guide. Now all the External Links in my site are opening in New Window.

    But, I have a doubt. To Open a Link in new window we use target=”_blank”. When I checked the link via Inspect Element I also saw rel=”noopener” what does this mean?

    Should I remove rel=”noopener” or keep it as it is? What is the use of it?


  22. Thanks Allyssa for such information but I want to ask is there any other way I can do with “External links” without plugin?
    Keep up!.

    1. The only other way is to manually set each link to open in a new tab via the HTML code. The plugins I believe handle it via Javascript, so if you’re familiar with that, you can probably add some code to your theme to achieve the same thing without a plugin.

  23. Thanks for the handy post!

    I did this the manual way for a few links to our shop on our site, but it only seems to work in Chrome. When I click a Shop link in Firefox or Safari, it opens in the same tab. (The Shop link in the main nav is the only exception; it works everywhere.)

    Have you seen this issue?

    1. Unfortunately, I have not. Manually adding the target to the link should work across all browsers. Not sure why it wouldn’t work in Firefox or Safari.

      1. Hi Allyssa, will this work if for instance, I want a new page eg “Photos” whenever someone clicks on the page tab for “Photos” it should open an online album, it must not open the page and then show a place to click and follow external link – the page itself must redirect immediately to the other site/link. How do I get that to work?

  24. This was such a super-useful article. I learned a lot by reading it. And I installed the suggested Plug-In that prevented me from having to go back and update all my links. What a time saver. I am so glad I came across your guidance. You saved me a good few hours of my life, and added to my blogging time. 🙂

  25. Thank you for this piece..tbf this sums up wordpress for logic…why would the option to click ‘ open in new tab’ be so hidden away.

  26. Thanks for the advice Allyssa. I am trying to use this with a widget that opens an image (map of our churchyard). My page has a thumbnail of the image, and users can click on it to open the jpg file…but there is no option in the widget to open in a new tab.
    I was hoping your plug-in would do the trick….
    I’ve activated and even gone into the plug-in settings and explicitly said open a new tab for of jpg. While it does that, it also changes my original page to the jpg. Any ideas?

  27. I have been on the internet lately, looking for something to read and that is how I came across your site and saw this article of yours. So, I decided to see what it says and I find out that it is so amazing. You really did a great work in on your site and the articles you posted on it. You really take your time in posting this article or and they are clearly detailed. Once again, you are good at article writing and I will be coming back to view more article updates on your site.

  28. are you finding it hard to download free latest movies you don’t need to look far anymore TFPDL as the latest and trending Hollywood and Bollywood Movies check this out… TFPDL

  29. do you want to download your favorite Music and you are finding it hard then you don’t need to look far Mp3skull provides a direct link to download the Mp3 music file. Check here Mp3skull

  30. On the contrary, O2tvseries is more than just a free tv-series download site. Where you can download free complete seasonal movies or tv series season film. The platform also integrates a free movie download extension.

  31. The Cash App, like Venmo, is a peer-to-peer payment app that allows you to send and raise cash on the app with others.

    Cash App is one of the leading online payment applications on the Google Store and App Store platforms.

Comments are closed.