Comments on: How to quickly extract domain names from URLs in Excel

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

  1. Amazing article

  2. Thanks a lot for sharing how to extract a domain with Excel.

  3. 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

  4. Hi,
    In the IF(ISERROR) formula mentioned above how do we return a null value if the reference cell is blank.

  5. We can use this formula too.

    =MID(D3,FIND(".",D3)+1,RIGHT(FIND(".com",D3),LEN(D3))-8)

  6. 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 ?

  7. 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.

    1. 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)

  8. 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))

  9. 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.

    1. But your method is worth the try! Thanks for the this well-documented guide! :)

  10. 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

  11. 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.

    1. 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.

  12. Thank you very much :)

  13. can you please make a video of this reading the entire article is a bit time consuming :( specially when you are in the office.

  14. Dude, this is complete madness of the formulaes of Excel. Excellent tutorial and very much helpful.. Keep it up!!!

  15. Glad you found it useful Alexander and also for the tips for other all readers

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)