Screenshot by Lance Whitney/CNET

Apple's iTunes and App Stores and other online services experienced major hiccups throughout the day Wednesday, a rare occurrence for the world's most valuable technology company.

Apple's major online stores -- which include the Mac App Store and iBooks Store -- became unavailable for all users around the globe before 2 a.m. PT, but the problem appeared to be fixed as of 1:45 p.m. PT. Site outages happen on occasion for everyone from Amazon to Facebook, but such a widespread problem was rare for Apple. An earlier outage in September impacted some users but was fixed in less than six hours.

"They made a mistake and they screwed it up," Gartner analyst Van Baker said. He added that he was surprised it took Apple so long to fix the problem but noted it probably wouldn't impact Apple's revenue.

"People will be frustrated or annoyed, but they won't give up on what they're going to buy," he said.

Where Apple could take a hit is its reputation. The company has long touted how its products "just work," in the words of former CEO Steve Jobs. Even though Apple has few site outages, the Cupertino, Calif., electronics giant has had some mistakes of late, including bugs in its mobile operating system and security concerns related to iCloud.

A glitch in Apple's iOS 8.0.1 mobile software prevented iPhones from connecting to cellular networks. Apple ended up pulling iOS 8.0.1 about an hour after it first became available last September. The company released iOS 8.0.2 a day later to fix the problem. Apple also was rocked last year by worries about the security of its devices after nude photos were stolen from the iCloud accounts of celebrities such as Jennifer Lawrence. The company said the attack wasn't a widespread breach on iCloud or Find My iPhone but was the result of a targeted attack on celebs.

Apple on Wednesday apologized for the outage, blamed it on an internal domain name system error and said it was working to fix the issue as soon as possible. With a DNS error, a glitch prevents users from accessing the correct Web address. The domain that users are going to isn't returning the information the computer needs to connect.

Here's the original statement, and we've contacted Apple for an updated comment:

"We apologize to our customers experiencing problems with iTunes and other services this morning. The cause was an internal DNS error at Apple. We're working to make all of the services available to customers as soon as possible, and we thank everyone for their patience."

The outage came only two days after Apple hosted its most recent press event. The company on Monday unveiled its new MacBook, dropped the price of its Apple TV by 30 percent and showed off more features of Apple Watch. Apple is counting on its first smartwatch -- which costs from $349 to $17,000 and requires an iPhone 5 or later -- to become a strong market alongside the iPhone, as well as get people to buy more smartphones.

Apple generates most of its revenue from its iPhone, but iTunes and the App Store also are significant to its results. In the fiscal first quarter, which ended December 27, Apple made $4.8 billion in revenue -- or about 6 percent of its total sales -- from services. The segment includes iTunes, AppleCare, CarPlay and other items. iTunes alone accounted for $2.6 billion in sales, up from $2.4 billion in the year-earlier period. A year ago, Apple said 800 million people had iTunes accounts.

The problems Wednesday started before 2 a.m. PT, according to Apple's service page. The App Store itself was intermittently up and down for hours, sometimes accessible and at other times not, displaying a message that an item was not available even though users hadn't selected anything to download. If users were able to access the App Store and then tried to download or purchase an app, album or other piece of content, they received an error that the item was not available.

At other times, trying to download an album or other content brought up an error page that the content could not be displayed or that the iTunes Store was temporarily unavailable and could not complete a user's request.

The App Store app was accessible, meanwhile, but users couldn't download anything. Tapping the Get or price button to download an app displayed the Install button. But if a user then tried to install the app, the Get button simply appeared again, preventing the user from actually running the install.

Even Apple's own online support site wasn't working, as it wouldn't let users complete their requests for support.

As of 7:30 a.m. PT, Apple's system status page confirmed that the App Store, iBooks Store, iTunes Store and Mac App Store were still unavailable. Apple's status message pointed to a problem with multiple store services saying that all users are affected. "Customers may be unable to make purchases from the App Store, iTunes Store, iBooks Store, or Mac App Store," Apple's page noted.

The sites remained down as of 1:30 p.m. PT, but Apple's system status page showed the stores were back up as of about 1:45 p.m. PT.

The App Store was last down on Monday, but that was intentional as a precursor to the Apple Watch event.

Updated at 7:30 a.m. PT with current System Status page information.

Updated at 1:30 p.m. PT with additional information and Apple statement.

Updated at 2 p.m. to reflect the stores being available.