Error 1013 on Verizon iPhone 4.2.6 osx (fix)
Posted on 2011.02.08 by Jose Ibarra
This morning I was prompted to upgrade my Verizon iPhone to 4.2.6. During the upgrade, I ended up in an endless loop “The iPhone “iPhone” could not be restored. An unknown error occurred (1013).

I confirmed I had the latest iTunes, confirmed all OSx updates with no luck. After looking around the web I found that the issue is related to a DNS entry in the host file. To fix the issue and get around the loop, do the following:
- Open “Terminal”(/applications/utitlities/terminal.app)
- Type sudo vim /etc/hosts (you will be prompted to enter your password)
- Scroll down till you find gs.apple.com, now arrow to the beginning of that line (hit the “i” to insert a the following character) put a “#” in front of it, the result should be simliar to #127.0.0.1 gs.apple.com, now hit the “esc” key.
- Now type :w and the enter key, followed by :q and the enter key (this is writing the new hosts file, and quitting the editing program)
- To clear your cache type dscacheutil -flushcache
Good luck.
Thanks – this corrected my issue when I was trying to update my Vz iPhone today!
How may i do this on windows!? I tried it, and nothing seems to be working!!!
It depends on which version of Windows you are running. Look through your file system – you want to edit your host file, typically in \windows\system32\drivers\etc . You can open the file with Notepad. Once you make the edit, save your file, close all your internet browsers and clear your cache. To clear your cache open up your command prompt (start > run > cmd (or command), and run ipconfig /flushdns.
Good Luck
Jose
Dude you have no idea how pissed ive been and how many phones i was about to go through… you just save me a lot of stress, time, and money <33333333333333333
Thanks, worked for me! Been messing with this thing all morning!