When you are trying to create a Visualforce page in Salesforce, you might get this error:

Error

Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint =https://smagicinteract.eu1.visual.force.com/services/data/v36.0/sobjects/ApexPage


P.S: The domain is eu1 here. You would receive the URL with your respective domain name in it. The best way is to copy the URL from the error message itself


To add the remote site settings:

  1. Go to Setup -> type "Remote site settings"
  2. Click on "New Remote Site" -> add "https://smagicinteract.eu1.visual.force.com/services/data/v36.0/sobjects/ApexPage" in the URL and you are done.

Now, try to create the visual force page again and you shall not receive any such error in future!