A few tips and pieces of advice will help you get domain names from a list of URLs using Excel formulas. Two variations of the formula let you extract the domain names with and without www. regardless of the URL protocol (http, https, ftp etc. are supported). The solution works in all modern versions of Excel, from 2007 through 2016. Continue reading
Comments page 2. Total comments: 51
Amazing article
Thanks a lot for sharing how to extract a domain with Excel.
How would you extract the domain name from the fqdn if it isn't part of the url.
it
fileserver.mydomain.com
hostname: fileserver
Domain: mydomain.com
I tried following your method, but couldnt get it. Then I found this: http://tripleseo.com/microsoft-excel-tips-for-seo-extracting-domains-from-urls/
Hi,
In the IF(ISERROR) formula mentioned above how do we return a null value if the reference cell is blank.
We can use this formula too.
=MID(D3,FIND(".",D3)+1,RIGHT(FIND(".com",D3),LEN(D3))-8)
Nice tutorial , i am not good in excel and need a little help if you can ...
i have a domains list in excel , like :
abc.com
abc.net
abc.us
abc.ca
etc etc ... What i actually need is domains extensions in next tab
i need only extensions in a seperate tab , so that i can easily filter all .coms etc ..
is that possible ?
This one is compact and good but not sufficient for my needs. We have URLs in as good as every possible (and impossible) format. We have URLs with protocol, without protocol, including www, excluding it, already exist of only the domain, exist of only domain and location, includes parameters and so on. I think you get the point.
One example would be "1und1.de/index.php?page=platin_umetz"
This is a very common format of URLs we have as data.
This is the one I made for myself: (Requires a table with a column named Website (Insert > Table))
=LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([@Website];"www.";"");"http://";"");"https://";"");IFERROR(FIND("/";SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([@Website];"www.";"");"http://";"");"https://";""))-1;LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([@Website];"www.";"");"http://";"");"https://";""))))
If you find some URL that does not work with this formula, please let me know. We can still refine this further.
Thank you almost three years later for this! Forks perfect! And of course Alexanders whole efforts and knowhow here!!! (even I had some Issues with his formular on some URLs)
Thank You !! It works!
For spanish speakers how to extract in spanish excel:
=SI(ESERROR(HALLAR("//www.";A2)); EXTRAE(A2;HALLAR(":";A2;4)+3;HALLAR("/";A2;9)-HALLAR(":";A2;4)-3); EXTRAE(A2;HALLAR(":";A2;4)+7;HALLAR("/";A2;9)-HALLAR(":";A2;4)-7))
For SEO purposes: Como sacar el dominio de una URL:
=SI(ESERROR(HALLAR("//www.";A2)); EXTRAE(A2;HALLAR(":";A2;4)+3;HALLAR("/";A2;9)-HALLAR(":";A2;4)-3); EXTRAE(A2;HALLAR(":";A2;4)+7;HALLAR("/";A2;9)-HALLAR(":";A2;4)-7))
Your formula works well for this URL type http://dichvudangtin.noodesign.net
I'm using another method on how to extract the domain from a URL. Here's how I do it: =left(A2,search("/",A2,9))
where A2 is the cell where the URL is located.
The formula basically searches for the "/" after the 9th character in cell A2 and cuts everything out when it returns.
Hello Wella,
Your formula works well for this URL type - http://www.web-site.com, however it won’t work if a URL includes a protocol. For example, if you have https://www.ablebits.com/office-addins-blog/, the formula will produce "https" rather than "ablebits.com".
But your method is worth the try! Thanks for the this well-documented guide! :)
That's great thanks.
It seems to be missing one option if a URL has no / at the end it gives an error.
How could I fix the formula to include this?
Thanks
Thanks so much for this info.
Been using it a lot recently as I've been working with lots of link exports.
It's been a real time saver.
Thank you for your feedback, Sam. If there are any other topics that may be of interest to you, please let me know and I will try to cover them in the next posts.
Thank you very much :)
can you please make a video of this reading the entire article is a bit time consuming :( specially when you are in the office.
Dude, this is complete madness of the formulaes of Excel. Excellent tutorial and very much helpful.. Keep it up!!!
Glad you found it useful Alexander and also for the tips for other all readers