What is the general approach I can use to predict whether a domain is related to a brand using a supervised learning algorithm?
It will be almost impossible to do this your way as you arw trying to derive context based solely on the domain names, and domain names more than often don't carry a specific context. Since the word ups occurs in each domain and the words coming before or after hardly carry much specific information. If you could extract some information about the website by hitting the url, you will not need any machine learning at all. I am not saying this can't be done through ML, all I am saying it won't be that effective. If you use scikit learn you will need to find a way to tokenize the domain, in your case a character level tokenization will be useful, throw in a BOW (Bag of words, characters in your case) create one-hot vectors out of it and use them as features to predict the label. If you have a lot and I mean lots you can train a character level convolutional neural network and it might perform better. Cheers.