You can use the functions Stuff() and CharIndex() :
Select stuff(url ,1, charindex('.', url), '') newUrl From t
Demo Screenshot 1
According to the comments, you can perform another check using the CASE expression:
select case when charindex('.', url, charindex('.', url)+ 1) > 0 then stuff(url ,1,charindex('.', url),'') else url end newUrl from t
Demo Screenshot 2
Or, if you need to check the first 3 characters for www;
select case when left(url,3) = 'www' then stuff(url ,1,charindex('.', url),'') else url end newUrl from t
Demo Screenshot 3
source share