Have you recently changed your machine name??
If you face this error while connecting to SQL server, here is the solution
Make sure that the Server Name matches the name of the machine you are trying to connect.
To get your machine name, right click My Computer -> Properties and there you can find Computer Name.