The Department of Homeland Security and the FBI are investigating a massive cyberattack that stopped or slowed access to Twitter, Spotify, Amazon and other sites Friday by targeting a firm responsible for routing Internet traffic their way. Dyn, a New Hampshire Internet services company, reported around 4 a.m. PDT that a large-scale attack temporarily overwhelmed its servers. By 6:30 a.m., the company said, service was back to normal, but around 9 a.m., Dyn again said it was under attack. Just before 11 a.m., Dyn said it was investigating “several attacks,” which were “resolved” around 3 p.m. Pacific time. Dyn links Web addresses to specific numeric codes, called IP addresses, that computers use to communicate with each other. Because so many companies rely on Dyn as a go-between, the effect was widespread. A massive cyberattack blocked your favorite websites; FBI and Homeland Security are investigating