How to fix iTunes error 21 while restoring?

How to fix iTunes error 21 while restoring?

If your itune not working then reinstal leastest ver og itune.

But fortunately, I fixed this error after trying for couple of hours. If you are experiencing the same problem as me, follow the instructions below.

Method 1: Just try restoring on another computer and things will go smooth.

Method 2: Step 1: Completely remove iTunes from your computer.

Step 2: Open your hosts file using notepad. It can be found at C:/Windows/System32/Drivers/Etc/ and remove the two lines shown in the image below and save the file.

Step 3: Install iTunes again.
Step 4: If you are restoring a custom firmware, you will need to put your iPhone into pwned DFU mode. To do that, download Redsn0w and select Pwned dfu from the menu. After that, just try to restore your iPhone again and it will work.

And if you are restoring an official stock firmware, just put your iPhone into normal dfu mode and then try to restore.