Usually I see this error when there is a web.config in the webserver root, so on windows go to c:\inetpub\wwwroot and remove the web.config file form there. you can just cut and past it into a backup folder for testing.
Thanks again @HenryLindemann but unfortunately there wasn't a web.config file in the root directory. I can see a web.config in the portal and server directories so maybe one of them is causing the issue?
Hi @DeanHowell1 ok can you log into the webserver and call the url from there and see what the error is then.
Also is the ArcGIS server working correctly you can test this by entering the url on the server that the ArcGIS server is installed on https://localhost:6443/arcgis/rest and also check if you see soc.exe in the task manager
Thanks @HenryLindemann your suggestion to see if the soc.exe led us to the issue. We had a failure before Christmas in a HA environment and the web adapter we looking for a server that had terminated in AWS. After repairing the IP address it was able to find the correct end point. Thanks again.