DASHBOARD > DESIGN > EDIT HTML
to open template editor
Use keyboard shortcut ctrl+F to find <head> and immediately after that, add a single line <base target='_blank' /> so that it become
<head>
<base target='_blank' />
Save the edited template and viola, all links in your blog will now open in new tabs or windows.
Note 1: Blogger is now XHTML so all tags must have matching closing tags or be self closing. The above tag is self closing because it has that forward slash / at the end of the tag.
Note 2: This will cause all links including links to your own website to open in new windows. If you don't want this, then don't use this method.
Update: A commentator asked for all links to opens in a new window/tab, but then when other links are clicked, rather than opening another separate new window/tab, it replaces the one that was previously opened. So they can stay on my page while new links all appear in the same new window, not multiple new tabs/windows. This can be easily done by using <base target="_new"> instead so that it becomes
<head>
<base target='_new' />
I have tested it at Useful tools for bloggers and it works fine.
<head>
<base target='_new' />
I have tested it at Useful tools for bloggers and it works fine.
Note 2: Just wondering if adding a note for frequent visitors to set browser to open in new tabs rather than new windows will reduce the number of visitors having an unmanageable numbers of new windows opened. Do leave your opinions in the comments below:
Note 3: Some bloggers may prefer some links not to open in new window/tab but to open in the same window, Nute gave this tip to add the attribute target="_self" for those links you want to open in the same window/tab.
I have tested his tip at Safety Tips and Tricks (see Blogger Resources in the second right sidebar). His tip work correctly if the first and third link ("original Blogger Tips and Tricks" and "Blogger Book" opens in new window without the need to add target="_blank" and the second (Blogger for Dummies) opens in the same window by adding target="_self"
thats right my master...
ReplyDeletehttp://www.w3schools.com/tags/tag_base.asp
xixixi...\m/
do u remember me??? hohoho!!!
Sure I remember you but you changed your profile
ReplyDeleteIs there a way of just forcing the link lists to opn in a new window rather than every single link? I don't really want my archive list nor my keywords list to do this, but it would be useful for external websites. I already add the "_blank" HTML into links I manually place within my blogs. Jon
ReplyDeleteLook at Making links in link list open in new window and if not clear let me know and I will probably write a new post.
ReplyDeletethank you dear peter. let me go and try. and will come back and write the feed back.ok
ReplyDeleteThanks will greatly appreciate feedbacks.
ReplyDeleteDear Peter, Thanks for this tip which I stumbled upon today. I just started a new blog and am learning lots from you. Patty K.
ReplyDeletesir, tahnks for the tutorial, but i found there is a problem when u are using the intensedebate comment in blog.. people fill up the comment and then click the submit button, and a new tab open, the response never made it...
ReplyDeleteive try to undo by deleting the html code, but it cannot happen as well.. can you please tell me how to undo this.. thank you
Hello!! Peter, I've done this will all my links even the page navigation links like older post newer post and older posts links also open in a new tab
ReplyDeletecode is well over my head. sorry, it wasn't useful
ReplyDeletethank you for the great tip Peter, much appreciated!
ReplyDeleteaahh.. you just made my day!! :) THANKS!
ReplyDeleteYep it is working fine but there has to be some option to make only sub links in new page..
ReplyDeletewww.knowinfonow.com
I really hope this works! It has been a nightmare adding manually target= "new" every time I had a link :-)
ReplyDeleteI have a number of links which take visitors away from my Blog. Just implemented the code and now the links open in new window. Many thanks.
ReplyDeletedo you have a code code that will automatically make the links open to new tab for the Content of the Post Only..
ReplyDeleteThank you so much for this information! It did just exactly what I wanted.
ReplyDeleteThanks . EASIEST way ! Good job
ReplyDeleteReferring to Jon post, he is right, embedding the code directly into the blog html template will result all links to open in new tab/window including the 'archive list'. It is global, that is it affects the whole blog. It is better to add the code (target="_blank") in the blog post links.
ReplyDeleteThanks & Nice
ReplyDeleteZahir
http://notebd.com
Thank you for this. I have been wanting to open limks in a new window for a while but I have been afraid of wrecking my blog by doing something wrong with the html. This was really clear and straight forward :)
ReplyDeleteThank you sir, for that your blog have help me in blogging for a long time. But i have a question for you sir, lets say, i have implement the all link open in new tab as above, i like it, but i dont want when they click on my page tab, they go to new tab also. can i make the page tab stays and change pages in the same window?
ReplyDeleteIts great!
ReplyDeleteImproves my page impressions enormously !
Thank you!
http://hello-engineers.blogspot.com/
nice
ReplyDeleteAdmin, this particular post has the code that you seek. Are you saying it is not working for you?
ReplyDeleteFay, this post is about making all links open in new tab/windows
ReplyDeletemhmd Baden Powel, where did you read about Intense Debate comment as I have not mention it in this post?
ReplyDeletePaul, the answer to your question is yes, all links will open in new tab or window
ReplyDelete2UrHealth, all you need to do is to get to the template editor and add this code
ReplyDelete<base target='_blank' />
immediately after <head> so that it become
<head>
<base target='_blank' />
You don't need to understand the code, you only need to know how to add it. Understanding can come later if ever.
mhmd Baden Powel,I am guessing that perhaps using inline CSS may get the tab to open in same window. May try to test that if I find the time
ReplyDeleteIt worked, the first time. Thanks so much for the post. I add several links to my blog and it's a lot of work changing the html for every link. Your a gem:)
ReplyDeletedo you have a code that will automatically make the links open to new tab for the Content of the Post Only and not all the links.
ReplyDeleteThanks
Open new tabs? That is controlled within browser. 1, Try clicking in the mouse center button
ReplyDeleteor
2. Right-click on mouse and select Open link in new tab
LOL. This means you have not come across such code. I meant it would be nice if we can have a code that only opens the hyperlinks within the body/content post and not for the navigation page links.
ReplyDeleteWaiting for that ingenious brain to find us a new tip for amateur like me.
Thanks for the code, , , i'm still using it here http://governmentjobshere.blogspot.com/
THANK YOU SOOO MUCH!! THIS WAS SO UNDERSTANDABLE AND EASY TO DO!!! THANK YOU!!!
ReplyDeleteDelina
dewthis.blogspot.com
Excellent info!! Thanks for making the instructions understandable even for us non-programmers.
ReplyDeletesorry for the late reply sir. I mean that when i use the all link open in new tabs before this, even my intense debate comment affected. i try to undo the html code, and delete what ive added but the html couldnt be saved. Then, i go the design tab, and change my layout and theme, then only did it work normally. i appreciate all your help and tutorial sir. thank you
ReplyDeleteok..tq..i have try it..n it's works..
ReplyDelete;)
Thanks, and especially for that note...
ReplyDeleteFantastic! I just got this added to my blog. It will help readers be able to stay and finish reading the blog but have the links open and ready when they are. :)
ReplyDeleteThanks so much for this. I didn't even know that it even existed! :)
ReplyDeleteits really really mind blowing trick..............visit my blog for Nokia secret codes http://besttipsntricks.blogspot.com/
ReplyDeleteHi Peter,
ReplyDeleteI linked your post in my blog
http://www.ideepercomputeredinternet.com/2011/04/come-aprire-tutti-i-link-di-un-blog-su.html
This is a very nice hack but it's against the rules of adsense. You can't open tha ads in another tab.
Who has not adsense has no problem.
Greetings from Italy and thanks for your posts.
Ernesto
Easy peasy lemon squeezy!
ReplyDeleteThanks a million for this tip.
grazie per il link
ReplyDeletegrazie molte !thanks!!
ReplyDeletethanks!!!!!
ReplyDeletehttp://cracckers.blogspot.com/
Hi Peter! It's me once again...
ReplyDeleteI've tried using target="blue" and it works
The Kablogs Journal
for The Psalmist,
ReplyDeletePutting target="blue" means you want the link to open in a tab or window called "blue" eg if you specify that target="new, same, it will open in a new tab or window called "new"
All I can say is.... YOU ROCK!!! thank you SO much! Everything else I read was SO complicated... I did what you wrote and VOILA! it was finished! Again, thanks! you rock!
ReplyDeleteThanks Peter, worked like a charm and I didn't even know I needed it until I read this post! You're the best! Hugs!
ReplyDeleteThankyou so much!! This had been really bugging me! Lols. You're totally P-awesome! ;) M x x
ReplyDeleteThank you, Peter! I'll be coming back often...
ReplyDeleteFWIW, I *always* have my Firefox to "Open new windows in a new tab instead"... Never thought to post it on my blog though. (I don't have any visitors yet...)
It was a very useful tip for us at cultural synergie
ReplyDeleteMany thanks, keep it up
Hi Peter,
ReplyDeleteI used your code until I notice that also internal links open in a new tab. So I searched and I've written this one to open all external links in a new window: http://goo.gl/Dphpj
I've commented it with some web designers and everyone said me that is an horrible method that scary people and very user un-friendly because you lose the "back" button (http://goo.gl/CNVUL). What do you think about it?
Thank you!
Note that at the beginning of this article, I have posted "This request to make all hyperlinks pops up every now and then so might as well make a post for it." so it is mainly because many bloggers want it.
ReplyDeleteRegarding no "Back" button, I think it is not a concern because once you close the new tab/window, you will be taken to the referring tab/window or at least that would not have been closed and still available in your browser.
As to whether it is good, there is even controversy over making any link open in no tab/window with some advocating not even a single link open in new tab/window. For me, I often prefer to open links in new tab/windows and just close them if I don't need them anymore and that is my personal preference.
I prefer to open in a new window/tab too, but most people in the reddit post (mentioned above) said that should be the user to decide it and don't confuse it, otherwise you will lose users.
ReplyDeleteI know that you mentioned that all links will open in a new window, but I see that here there are some bloggers that want only external links to open in a new window, that's why I wrote my solution. I hope that it could be useful for all of you.
Thanks to all!
hi Uncle..
ReplyDeletei ve sum links to MP3songs in my page..
i want (ONLY) them to open in a new window..
oh, u remember me.. d same guy who was making a new blog every single time (guinness record fr most no of blogs :P) he blogged instead of postin in 1 single blog.. :D
m a big fan of urs nw.. :)
kayy
What is the code you use? Perhaps you can add the attribute target="_blank" to the code you can get what you want.
ReplyDeleteI have been blogging for 3 years with blogger and NEVER KNOWN how to do this. You have quite literally changed my life. Thank you!!!!!
ReplyDeleteHi from me too, Peter,
ReplyDeleteI read through the comments but I didn't see whether this code affects Google Adsense links. If it does, that's a bad thing. Please share your experience on that, as it is not advisable to experiment with this sensitive issue. Does this code make Adsense links open in new tabs/windows? Or do they open in IFRAME by default?
Also, what if this code is placed after the "body" tag - will it affect only the links which are in the body of the blog?
I tried some links around your blog - not all of them open in a new window. What solution do you use for your blog?
Greetings from Bulgaria :)
Check out Google Pack Components which I used to test implementation and confirm for yourself that clicking on Javascript does not open in new windows.
ReplyDeleteThanks very much brother it run smoothly.
ReplyDeletehttp://tipwithtrick.blogspot.com/
Good Luck!
Thanks so much for this post! I had no idea it would be that simple.
ReplyDeleteFor those who are using this tip and have a few links on the page that they want to open in the window/tab, and not a new window/tab, you can override the behavior of individual links by adding a target="_self" to the A tag. This will cause that link, like your HOME link, to open in the same window.
ReplyDeleteMany thanks to Nute. I have tested his tip at Safety Tips and Tricks (see Blogger Resources in the second right sidebar). His tip work correctly if the first and third link ("original Blogger Tips and Tricks" and "Blogger Book" opens in new window without the need to add target="_blank" and the second (Blogger for Dummies) opens in the same window by adding target="_self"
ReplyDeleteGRATE THIS POST
ReplyDeleteThanks man.very good tip
ReplyDeleteYou are a genius. Thank you... and I'm on the upper luddite html scale. I now feel smarter that I did it and it worked. AWESOME!!!! Peace & Love, @thestorysmith on twitter, blog: The Storysmith
ReplyDeleteYay!! Thanks :)
ReplyDeleteThank you so much! It worked. Awesome.
ReplyDeleteThank you! Just what I was looking for and really easily explained. Brill!
ReplyDeleteI need all the help I can get as I'm new to this blogging game! Thank you SO MUCH, it worked first time. Super easy to do, awesome as!!
ReplyDeletehttp://vee-travels.blogspot.com/
I did it but I have pages on my blog and now if people click around they end up with tons of open windows. So it doesn't work for my blog. How do I do it individually with each link?
ReplyDeleteShena
Have a look at How to make active link in post (ignore the part about making links in comments because the attribute target="_blank" is not allowed.
ReplyDeleteThanks for the help!!!
ReplyDeletethank you soooooooooooooo much
ReplyDeleteWorked a treat thank you very much :)
ReplyDeleteWow this such a great article and the tips are very comprehensive. For sure many entrepreneurs with small and big businesses are going to benefit from this. Keep it up!
ReplyDeletesign printing"
Oh wow, thanks so much!!!! Been trying to find something like this for ages... finally all my links open in new windows, thanks so much! you're a blog saver!
ReplyDeleteKaren Xavier
Very nice sharing guys more like that on http://www.tutorialsworkshop.com
ReplyDeleteI have so nice best friend quotes, and with funny for boys and girls there in my website. “Our best friends understand always, when we said forget that. Waiting forever while we say a little while. Said while we said leaved me alone. And after open the door you can say come in.”
ReplyDeletethanks a lot man.. great tip... so simple... god bless you.
ReplyDeleteHi,
ReplyDeleteI would like to set mine so that the first time a visitor clicks a link in my blog it opens in a new window/tab, but then when other links are clicked, rather than opening another separate new window/tab, it replaces the one that was previously opened. So they can stay on my page while new links all appear in the same new window, not multiple new tabs/windows. Thank you!
Use attribute target="_new" instead.
ReplyDeletehi,
ReplyDeleteIs there a way to make it so links to external sites open in new tabs but ones which just link to other pages in my blog open in the same tab?
thanks
Perhaps that can be achieved using conditional tags but I am at a loss for the moment what conditions to apply
ReplyDeleteI'll have a look into conditional tags
ReplyDeletethanks very much
Hello, using 'new' works great! Easy, but I was really only hoping to apply this to my pages/tabs. Where in the HTML code would I need to add this line?
ReplyDeleteThanks!
Hi, How to make only outside link to open in new but not own site links.
ReplyDeleteFor exp my own site links in post/sidebar etc should open n same in windows but all other outside link in new tab/windows.
You can only do that manually
ReplyDeletemanually? but how for sidebars?
ReplyDeleteI can do in post easily with your tips above.
For own site target="_self" or target="_new"
ReplyDeleteFor outside target="_blank"
Any words can replace new
thanks peter... my blog is http://tdsolomons.blogspot.com/ it has about 45 views a day. can you please take a look at it and suggest me few tips to increase its views. i'll greatly appreciate that.
ReplyDeleteRegards.
Write good content and for human to read and not just for search engines which may make it artificial.
ReplyDeleteThanks for your advice Peter.., i'll try :-). thanks for your time..
ReplyDeleteI have another Question ; i have some posts ranked 1st on google search results . will it effect that rank if i do some edits on those posts..?
Regards.
I don't think so, but it depends on how extensive the editing is. In any case, search engines are notorious for being fickle and changes without notice.
ReplyDeleteBut since you got ranked number 1, I wouldn't mess with it if I were you.
ReplyDeleteThanks Peter.
ReplyDeleteI just want to correct some errors in those posts and to make all the links in those posts open in new tabs as you've discussed on this topic.
Thanks a lot Peter...
ReplyDeleteThanks a lot this helped me much........!!
ReplyDeleteThank You very much Peter... :)
ReplyDeleteI have try the code and it works just fine :D
what I want to ask right now is.. How to make this happened but only for the link on my post not all the link in the page ?
where should I put the code so I don't have to add target='blank' or 'new' in every link in my post. Should I put it in body area or more specific in the post area ?
Thank you.. :)
thanks man
ReplyDeletethank you,
ReplyDeletei did it and now my links open in new window.
but google adsense ads are open same window. what to do?
Adsense uses Javascript and they don't allow tempering of their script.
ReplyDeleteDo you happen to know how to make a specific page (from your blog's tabs) open in a new window?
ReplyDeleteHi peter..i need a small help in this new tabs..i embedded ur code & its working fine in my blog..but the prob is even my home page menu tabs are also opening in new tabs which i dont want..all the remaining links except menu tabs need to be opened in new window. can u help me by telling solution for this..waiting for ur reply
ReplyDeleteThank you for posting this! My problem now is that all my Blogger Page/Menu Tabs are all opening in other windows. If someone views all my tabs, they will have 6 windows open! Is there a way to have only hyperlinks open in a new window and not the menu tabs?
ReplyDeleteThanks for your help!
While not exactly what you want, why don't you try the update in this post which will make all hyperlinks open in the same new tab or window.
ReplyDeletethank you for the suggestion! Do i post it on every page or just the template html?
ReplyDeleteJust the template
ReplyDeletecool story bro..ty
ReplyDeleteIs there any way to change the post title link to my private web address for all post
ReplyDeleteSign into Dashboard > Settings > Formatting
ReplyDeleteand tick "Show link field. Then when you publish a post, put the private web address (URL) into the link field. See Test link field and verify for yourself that the link will send you to this blog.
My problem is also:
ReplyDeleteThat all my Blogger Page/Menu Tabs/older post are all opening in other windows. If someone views all my tabs, they will have many windows open! Is there a way to have only hyperlinks open in a new window and not the menu tabs?
I want all EXTERNAL link to open in new window, not the one in the blog!
There is a way but I am not expert at it. How about this, for all links to open in new window, then the next click will open the same window. Check my update:
ReplyDeleteUpdate: A commentator asked for all links to opens in a new window/tab, but then when other links are clicked, rather than opening another separate new window/tab, it replaces the one that was previously opened. So they can stay on my page while new links all appear in the same new window, not multiple new tabs/windows. This can be easily done by using <base target="_new"> instead so that it becomes
<head>
<base target='_new' />
This has been very useful for me. Thank you very much ^_^
ReplyDeleteAfter I put this code into the HTML, I can not take it out. I'm now getting this error message: Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The element type "body" must be terminated by the matching end-tag "/body"
ReplyDeleteError 500
There is clearly an /body end tag in my blog. Any advice?
Thanks!
It should be </body> and not "/body"
ReplyDeleteIf you already know this, did you backup the template. If so revert to backup template and start again.
Hi Peter, I just want to make the links in a link list open in a new window. I see that you have instructions for this but my template does not have the option to "edit template or expand widget" under layout.
ReplyDeleteWould you mind taking a look at my blog and advising me? http://luvachicken.blogspot.com
Thank you, Dorothy
Sign into www.blogger.com
ReplyDeleteDashboard > Design > Edit HTML
Thanks Peter. Its working!
ReplyDeleteExcellent! Thanks
ReplyDeleteI share my flickr photos on my blog and previously when the photo link was clicked you were taken to the flickr page.
Now, with you great tip a new window/ tab opens.
Thanks
Thank you so much! This saves so much time and helps me from forgetting to click those little buttons!
ReplyDeleteThank you for sharing
ReplyDeletehttp://www.watchesclass.com/tudor-replica-watches.html
hey...
ReplyDeletecan is it possible to enter an html code on my blog,
so when e new tab opens,it runs on the background so i can continue watching the first tab???
thanks
gio
Thank you! It really works.
ReplyDeleteThanks. This sure helped with my blog. (www.idefineit.blogspot.com)
ReplyDelete:D
this also help for my blog www.newgamesforfree.blogspot.com
ReplyDeleteThanks so much for this! I'm glad I saved your page. I just updated my template and forgot to add this to it. Luckily I remembered about this tip. Such a big help!
ReplyDeleteThaks you so much, you are a genius, It really works. i love your blog :)
ReplyDeletecan yo tell me this,i am taking your website only as my example. how did you make your labels open in your website and how have you edited information inn the particular labels!!
ReplyDelete.
if you can give me the answer i will spread my friends about your blog truthfully..
if yo know the answer please send it it to akshay.a.crazy6@gmail.com
Well this post is about making all links open in another tab or window
ReplyDeleteI want to thank you SO much for this tutorial. Its so simple and effective- just what I needed for my blog. I'm thrilled!! Thanks again!
ReplyDeleteThanks for this. Is there a way to ignore all Linkwithin links or Outbrain?
ReplyDeleteThere are some codes which makes only links to external sites open in new tabs/windows but I haven't got to start writing about it yet. Perhaps later.
ReplyDeleteAwesome! Thank you!
ReplyDeletehi peter good post.... i hav a smal problem with my blog ababbol.blogspot.in my blog posts are opening in new tabs . . im new to blogging. can i make it.. plz giv me som tips..
ReplyDeleteHi, tanks for the great tips however i cant get my blogger blog pages to open in another tab, can you pls help!
ReplyDeleteMy blog is http://www.sebamedskin.blogspot.com
tanks for all your help
Are you referring to this particular post to make all links open in new tabs/windows?
ReplyDeleteSebamed, is your problem links in your blog opening in new tabs without you doing anything or is it it ain't and you want to make them open in new tabs?
ReplyDeleteWorks perfectly! Glad to have some across this post. Thanks for sharing this trick. Very helpful! :)
ReplyDeletewww.themommist.blogspot.com
THANK YOU
ReplyDeleteTHANK YOU
THANK YOU
I WAS GOING TO DO IT MANUALLY FOR ALL MY LINKS.
THANK YOU
then, for a popup window???????????????????
ReplyDeleteAwesome! thanks :)
ReplyDeleteexactly what I was looking for! Thank you.
ReplyDeletemy all internal links open in new tab.i have also used target_self but it can't work.pls tell how to fix this problem?????
ReplyDeletethanks, it really works
ReplyDeletesee http://entrr.blogspot.in/
Does this work with adsense ads?
ReplyDeleteThanks!
I tested that and no, it does not work with AdSense ads.
ReplyDeleteThank you!
ReplyDeletesimples. base target='_blank' / after the head in the html and all the links on my new blog http://trailartukpoems.blogspot.co.uk/ OPEN IN A NEW TAB
ReplyDeletewhich is what they do on my other recent blog http://starcrosshistory.blogspot.co.uk/ so I couldn't fathom the problem
Thankyou so much