strip https or http from domain javasscript code example Example: how to remove https link from javascript result = url.replace(/(^\w+:|^)\/\//, '');