Websites operating in the UK will soon have to assess whether their services put users at risk of seeing illegal material, such as child abuse, suicide, fraud and terrorism, or face fines.