A method, performed by a first node , for handling usage of a Domain Name Service, DNS, server in a communications network , the first node operating in the communications network , the method comprising: - obtaining one or more first indications, the one or more first indications indicating one or more rules on how a device operating in the communications network is to select, based on one or more criteria, a DNS server , out of one or more DNS servers , for use by the device for an application, wherein the one or more first indications comprise an explicit indication of one of: a) which applications the one or more rules apply to, and b) that the one or more rules apply to all applications, wherein the one or more criteria comprise one or more of: i. the application for which the device is to instantiate the DNS server , ii. whether or not the application is for edge computing, iii. a first location of the device , iv. a second location of the DNS server , v. a type of slice instantiated for the use of the DNS server by the device , and vi. a Radio Access Technology to be used by the device to run the application, and - sending a second indication to one of: another node operating in the communications network and the device , the second indication indicating the obtained one or more first indications, wherein the first node is a Policy Charging Function, PCF, and the another node is an Access and Mobility Management Function, AMF, the device is a User Equipment, UE, and the second indication is a UE DNS Policy generated by the first node . - obtaining one or more first indications, the one or more first indications indicating one or more rules on how a device operating in the communications network is to select, based on one or more criteria, a DNS server , out of one or more DNS servers , for use by the device for an application, wherein the one or more first indications comprise an explicit indication of one of: a) which applications the one or more rules apply to, and b) that the one or more rules apply to all applications, wherein the one or more criteria comprise one or more of: i. the application for which the device is to instantiate the DNS server , ii. whether or not the application is for edge computing, iii. a first location of the device , iv. a second location of the DNS server , v. a type of slice instantiated for the use of the DNS server by the device , and vi. a Radio Access Technology to be used by the device to run the application, and i. the application for which the device is to instantiate the DNS server , ii. whether or not the application is for edge computing, iii. a first location of the device , iv. a second location of the DNS server , v. a type of slice instantiated for the use of the DNS server by the device , and vi. a Radio Access Technology to be used by the device to run the application, and - sending a second indication to one of: another node operating in the communications network and the device , the second indication indicating the obtained one or more first indications, wherein the first node is a Policy Charging Function, PCF, and the another node is an Access and Mobility Management Function, AMF, the device is a User Equipment, UE, and the second indication is a UE DNS Policy generated by the first node . <EOS>