In some cases URL may start with "www". In this case you will get an exception:
android.content.ActivityNotFoundException: No Activity found to handle Intent
The URL must always start with "http://" or "https://" so I use this snipped of code:
if (!url.startsWith("https://") && !url.startsWith("http://")){
url = "http://" + url;
}
Intent openUrlIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(openUrlIntent);