iPhone 4 Error 1013: How to fix Unknown Error on iOS 4.2.1

By Updated on

Although the update to iOS 4.2 is now live and available to download via iTunes, we are hearing numerous reports that some iPhone 4 users have been encountering error messages when trying to update to iOS 4.2.1.

If you head over to the Apple Support forums, you’ll see that the problem is pretty widespread and is affecting most people when they try to initiate the update process.

Also See: Safari 8 crashing in new OS X Yosemite update

Below is a screenshot of the error message which you may have been greeted with:

The good news however, is that the guys over at RedmondPie have compiled a list of steps in which you can take, which should fix the problem for you.

There are 9 steps in total, and you’ll be able to view them below thanks to RedmondPie:

How to Fix Error Code 1013:

Step 1. On your Mac, go to your “Applications” folder.

Step 2. Now navigate to the “Utilities” folder.

Step 3. Launch “Terminal”.

Step 4. Type “sudo nano /etc/hosts” (without quotes) and hit return.

Step 5. Enter your password

Step 6. Use the down arrow key to find the “gs.apple.com” entries. Once the cursor is in front, make sure you comment out the line(s) by entering “#” in front of the text.

Step 7. Save the file by pressing CONTROL+O.

Step 8. Exit the nano editor by pressing CONTROL+X.

Step 9. Restore your iDevice.

Try them out now and let us know if it worked for you. Just to let you know, we had no such problems updating, but obviously a lot of you did. We’ll let you know if there is official word from Apple regarding this problem.

  • http://twitter.com/dresta2 @dresta2

    Any steps for Windows users? (Besides buying a Mac :)

  • ziv

    what about pc users?

  • Rasit

    On Windows:

    Locate the hosts file in one of the following directories:

    Windows 95/98/Me c:windowshosts

    Windows NT/2000/XP Pro c:/winnt/system32/drivers/etc/hosts

    Windows XP, Vista, 7 c:windows/system32/drivers/etc/hosts

    Right click and click on “Open With…” and then click on “Notepad” on the list.

    * Remove the line that has gs.apple.com completely and save the file

    Enjoy restoring to 4.2 now :)

    • Gio

      You, my friend have saved my life….thank you for those steps…

    • Jason

      What if I dont hav a line that says "gs.apple.com"?

    • ploydk@yahoo.com

      Didn't find gs anything, only rhino.acme.com and x.acme.com!!! Please help…

    • ailin

      But when i remove gs.apple.com, i still can't restore coz i get another error 3194

    • guillerascu

      i can't delete the gs.apple file.. it doesn´t let me save the changes, what do i do???

  • Rick

    Fantastic!

    That worked. I'm on a Mac. One thing to note: when you use CTRL + O to save the file I had to press Enter after that.

    Windows users equivalent is probably the hosts file. To edit it just google for "edit hosts windows" or something similar. Basically you open the file in Notepad and comment out the same line by putting a semicolon ";" at the start of the line instead of the pound sign "#" like on a Mac.

  • Phillip

    what password do we type in?

  • Cranberry

    Life saver!!!!Thanks!!!!!!!

  • nick

    hey tryed for windows and you have to run nope pad as an administrater and open it that way otherwise it wont let u save the new settings hope this helps

  • Ralph

    OMG!!thanks Rasit!!your my life saver!!owe you one!

  • sanchez

    Worked like a charm!

  • Diane

    I was unable to get this to work and after one full nite of uploading to different user accounts with 4.2 I called apple for help. They must be instructed to act as if this is the only case they have heard of this happening. They were more interested in charging me 29.00 dollars than fixing the phone. After 2hrs with the first rep I was switched to a supervisor who insisted I repeat the last 2hr again and I would be charged 29.00 for a replacement phone they had locked up with their new software. The first phone i had no problem getting a replacement now she was giving me a very hard time and insisted on the 29.00.After 6 more hours 3 different computers it updated using a new computer! Try using a computer that has never seen an iphone. Apple please fix this or everyone will be afraid to use your updates and send your supervisors to customer relations class!!!!!

  • Naby

    Thank you so much guys, this is very helpful. I've spent almost 2 days to fix mine and now it's perfectly working. I use Mac though and yes you will need to hit enter again in Step 7 after pressing CONTROL+O.

  • Rodrigo

    thank u very much Rasit , u saved my life. ;-)

  • sam

    the local phone guy wanted to charge me 40 bucks, so i mad a donation in your name for that much instead.. merry christmas

  • marco

    im on window and the first time i tried it, it did nothing…went back in and in place of the deleted line i put two # signs…restoring from back up as i type…thanks alot for all you input

  • Joby

    Marco, you are correct we need to put two # one below the other for it to work , thanks for your input. However, a big thank you to Rasit , you are a star

  • sara

    I do all steps ,, but didnt work
    any one can help ,, my email ( power__sam@hotmail.com)
    thanks alote

  • Vman

    what password??? it doesnt take my mac password OR my itunes pasword!

  • mhey

    thanks! it worked.

  • jon

    i can't save the file….any tips?

  • peter

    run the file as as an adminstrator

  • Bryan

    Thank you so much, you saved me 200 dollars and are officially my hero

  • Men

    Thanks. You save my ass.

  • džo

    Thnx man!

  • max

    omg thank you

  • rich

    THAT WORKED LIKE A CHARM!!!! 1000000 THANKS!!!!!

    The restore was hanging when it would try to verify restore with apple. Unknown error 1013 would occur. Removed the line as stated. Worked beautifully!

  • Frank

    Thank you so much!

  • Patrick

    As a side note, you may have to flush the dns cache for this to work. Windows open up command prompt and type ipconfig /flushdns. This was the only way I could get it to work. I not for sure on Mac though.

  • moi

    changing the "hosts" file didn't work for me, but using a different computer (that had never had itunes installed before) did work. good luck!

  • jarda

    Thank you. I worked after I restarted windows.

  • jason

    why cannot save after delete the msg

  • Gav

    I eventually got this to work by doing everything that was suggested. Didn't appear to work until I added the two hash tags below each other though but I also flushed the DNS for good measure as well.
    Don't know what caused the problem in the first place though a possible update to 4.3 and a Jailbroken iPhone?

  • CHRIS C

    none of this stuff is working for me at all none of it i have doone ev erything u guys have said
    EVERYTHING!!!!!!!!!!! PLEASE HELP ME

  • Parkinglotninja

    the hashtag tip worked for me! thank you!!!

  • eduamendola

    Thanks guys. You saved my device.

  • brad

    amazing thankyou!

  • brad

    if anyone has trouble saving the file in windows vista 64-bit. Right click on notepad and "open as administrator" and then you should be able to save the file without adding the two # symbols.
    It worked for me after hours of struggling.

  • DUDE

    Absolutely perfect ! Just what I needed, thanks everyone … especially those people who said to enter "enter" after CONTROL+O

    !!!!!!!!!

  • Richard

    Thank you very much guys, I'm on XP with iPhone 4 and this error was driving me up the wall. Did what Rasit said, and added the 2 #s like Marco mentioned, then also did the flush dns, unplugged my iphone and restarted my PC,

    Thank yooooooooooooou

  • ipadguy

    i'm on windows xp, with iPhone 4, updating to 4.3.1…it never worked until i added a "#" sign to the beginning of the empty lines that used to contain the gs.apple.com… as previously mentioned by marco, first it failed, error 1013, then i removed the gs.apple.com lines, there were two of them, still failed, error 1013, then i added a "#" sign to the beginning of the two lines i removed that contained the gs.apple.com stuff and the third time was the charm, thanks Alan Ng, Rasit, and marco… wonderful!!! i thought i had me a very expensive digital picture of the "connect to itunes" image….. keep up the great work everyone…

  • Dee

    THANK YOU SO MUCH!!! i lost hours of sleep over this but i'll be fine now!! i'll at least get about 5 hours of sleep before my double today!

  • mr.shell

    OK OK OK OK OK OK I HAVE you can use any thing program or no ?

    if you can work restart mobile