We could get this error for any HTTP Request. I had this error due my Oracle HTTP Listener. After installing Oracle XE 11g 64 bit version, I was unable to open “Getting Started” link. I installed HTTP Listener on 80 port (instead of the usual 8080 or 8081).
The error was “Bad Request or Invalid Hostname”. It did not work for address .. meaning, even loopback address did not work. I tried the following
1. Loopback address 127.0.0.1
3. Server IP Address
4. Server Name
“Invalid Hostname” tells me clearly that the hostnames which I am referring to is not found somewhere & therefore it could not resolve it. Many results from google search were centralized on 80 port not visible in TNSListener. For me, it did not sound like the actual problem. Then I had a thought of going to hosts file & check it there. So, I opened hosts file from c:\windows\system32\drivers\etc folder. I added an entry for my server ipaddress with sername as
Saved it & to be sure, restarted the server.
After restarting, I tried to browse Oracle Get Help page & it worked. Now moving to my next issue with Oracle installation.. Hope this information was useful to you.