Looking to avoid troublesome social media postings by its officers, the New York Police Department has issued strict guidelines and ordered its members to comb through their personal profiles on Facebook, Twitter and other Web sites to ensure they are in line with the new rules.

As word of the order spread, police officers across the city checked their accounts to see if anything they had posted might run afoul of the new rules. Some edited their personal accounts to remove references to the department.

One officer, who had served in the military, replaced a Twitter profile photo of himself in his blue patrol hat with a portrait of himself in an Army uniform. Another wondered if his profile should include the word “detective.”

For years, officers faced relatively few official restrictions on social media, where many proudly posted photos of themselves in uniform and listed their job as “N.Y.P.D.” Indeed, the Police Department has lagged behind other jurisdictions in formalizing rules for personal online behavior.