SOLUTION TO "the recovery server could not be contacted" ISSUE!
So, if you are reading this, you might be facing the "the recovery server could not be contacted" issue when you are trying to install macOS.
I know this has been a common issue lately, so I thought I will leave a little guide to help someone who might be experiencing same problem.
Instead of holding cmd+R to get into recovery mode, try cmd+R+option to get into macOS Recovery over the internet. I think Apple shut down some of their old servers which prompted the "the recovery server could not be contacted" issue.
Hope this helps!