Boston police said today they had succeeded in restoring their primary website, six days after it was hacked by someone upset with the department’s handling of the Occupy Boston protests.

The hacked site and the old site, which police say has been restored.

The site, bpdnews.com, disappeared Feb. 3 and was replaced by an alternative site that included a message criticizing police and a video of hip-hop artist KRS-One rapping about police brutality over images of violent confrontations between officers and civilians. Anonymous, a group of renegade hackers, claimed credit for the cyberattack.

Advertisement - Continue Reading Below

The department has now posted a video on its Facebook page declaring that the department's computer staff have overcome the hacking. The video also includes wry comments from commanding officers for the department, including Deputy Superintendent Willie Gross.

“My reaction was: “Why would anybody want to destroy a perfectly good KRS-One song?’’’ Gross said in the video.

Deputy Superintendent Colm P. Lydon, who was interviewed at night with the flashing cruiser lights in the background, said with a mostly straight face: “Normally, I sleep pretty well. But since the site went down, I haven’t slept a wink.’’

This morning, a Globe reporter typing in the bpdnews.com address was still redirected to the department’s Facebook page, a workaround the department put in place the day of the hacking. Police spokeswoman Elaine Driscoll said more users will see the correct site over the next several hours.

“We again apologize to the community for the inconvenience it may have caused,’’ Driscoll said in an e-mail. “We have hopefully resolved the issue, but would like to remind the community that there are multiple ways to connect with us over social media.’’

Driscoll said the criminal investigation into the hacking continues.