The British royal family has said it can delete, block or report social media users who make comments on its channels that do not meet new guidelines published Monday.

The guidelines said that comments must not "contain spam, be defamatory of any person, deceive others, be obscene, offensive, threatening, abusive, hateful, inflammatory or promote sexually explicit material or violence," or "promote discrimination based on race, sex, religion, nationality, disability, sexual orientation or age." Neither must they be irrelevant, unintelligible, contain advertising or beach the terms of the social media platform.

The new rules were published in the midst of reports of sexist and racist comments and threats targeted at Kate, the duchess of Cambridge and Meghan, duchess of Sussex. In January, Kensington Palace sought advice from Instagram on how to deal with online trolls, the Guardian reported. The palace uses software to track comments as well as monitoring social media accounts manually.

Today we have published guidelines for interacting with The Royal Family, @ClarenceHouse and @KensingtonRoyal social media channels. Read in full here: https://t.co/b57TjSn09d — The Royal Family (@RoyalFamily) March 4, 2019

The guidelines apply to the social media channels run by the Royal Family, Clarence House (home to Charles, prince of Wales and Camilla, duchess of Cornwall) and Kensington Palace, social media handle for the duke and duchess of Cambridge, duke and duchess of Sussex and their Royal Foundation. Their combined Twitter and Instagram followers total more than 18 million.

The new guidelines state: "The aim of our social media channels is to create an environment where our community can engage safely in debate and is free to make comments, questions and suggestions."

"We ask that anyone engaging with our social media channels shows courtesy, kindness and respect for all other members of our social media communities."

Posts and comments that do not meet these standards may be hidden or deleted, and users who do not follow the guidelines may be blocked or reported to the authorities.