This iTunes error is usually encountered when attempting to restore
your iPhone with a custom IPSW (that is, the IPSW is not original).
When restoring with this IPSW, your computer would try to verify this
IPSW with iTunes and since it is not original, you get the error
How To Fix This Error From Mac Operating System
Follow the simple steps below to fix this iTunes error from Mac OS:
1. You need to access Terminal: Finder -> Applications
-> Utilities -> Terminal
2. In the input box, type sudo nano /etc/hosts
3. In the password area, type your password and click return.
4. The hosts file for your computer would open… In this file,
find the following:
5. Type # in front of the string which you found in step
4 above (If you find other similar strings, put # in front of them).
By doing this, you will comment out the apple hostname and prevent
your computer from verifying the IPSW.
6. Save the file, then close Terminal
7. Now launch iTunes and try to restore your iPhone again
How To Fix This Error From Windows Operating System
1. First, close the iTunes page.
2. Then, find Notepad. (Start -> All Programs -> Accessories -> Notepad). Right click on it and choose Run as Administrator.
If you already know how to open the hosts file, then do so and jump to step 5, if not, continue to step 3.
3. Once Notepad opens, click File > Open, then go to C:Windowssystem32driversetc
4. In the etc directory, choose the file called hosts (NOTE: This file has no extension. If it’s not visible, change your file filters appropriately).
5. When the hosts file is open, find the hostname string below:
Put # in front of this string (that is, it now becomes: #gs.apple.com).
6. Save the hosts file.
7. Exit everything
8. Now, open iTunes and try restoring your iPhone again.