Invalid Hostname – Bad Request

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).




Bad Request Invalid Hostname


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

2. localhost

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

<<serveripaddress>> <<servername>>

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.


Share This

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + two =