It is up to a landlord to decide who they let their property to. We would encourage all landlords to consider each application on its individual merits.
'DSS' is a defunct term that refers to the Department for Social Security, which hasn't existed since 2001. Within the context of housing, it is understood to refer to tenants who claim any kind of state benefit - especially housing benefit (or Universal Credit).
As such, writing 'No DSS' on an advert is, in a way, meaningless, since no one claims benefits from the Department for Social Security anymore.
The issue is not the wording, but whether the landlord/agent is universally rejecting all applications from tenants who claim benefits.
There have been no cases of landlords being successfully prosecuted for including terms such as 'No DSS' in their adverts. But there have been out-of-court settlements where tenants won large sums before the case was tried.
One line of thought is that advertising 'No DSS' (or similar) constitutes a form of discrimination which may be found to be illegal. For example, women are more likely to be recipients of child care benefits, and so advertising 'No DSS' may be found to indirectly discriminate against women, as described in the Equality Act (2010).
In early 2018, Rosie Keogh won £2,000 in private settlement over an advert blanket-banning benefit claimants. Read about it here.