Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Agent , HTTP1.0 & Virtual Host Names 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hello,

I had a problem with Google Webmaster Tools reporting a 400 error for my robots.txt file.

I asked on a forum what this could mean and they replied saying that the agent that hit my site was using HTTP1.0 and the server didn't respond properly...here is an extract....
When I set my WebBug to query any of the pages you mention and specify I want to send the request as HTTP Version 1.0 I get the following response from your server:


Code:
HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Fri, 06 Jul 2007 13:12:34 GMT
Connection: close
Content-Length: 39

<h1>Bad Request (Invalid Hostname)</h1>

That shouldn't happen. It's completely fine for the server to reply with HTTP Ver 1.1 as it did, but it should send a 200 OK response and the file. For instance, if I do the same thing on my personal domain I get:


Code:
HTTP/1.1 200 OK
Date: Fri, 06 Jul 2007 13:14:11 GMT
Server: Apache/2.0.52 (Red Hat)
Last-Modified: Tue, 28 Nov 2006 01:42:34 GMT
ETag: "5d08ed-5b8-c3a59680"
Accept-Ranges: bytes
Content-Length: 1464
Connection: close
Content-Type: text/html

So my question is where on IIS6 do I configure the server to be compatible with all HTTP requesst from all UA's and why does the IIS server not respond correctly automatically.

Also are there any implications with making these changes?

All help understanding this and how to resolve it is much appreciated.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hiya [wavey]

(there is no escape, you will be assimilated) :)

A couple of ways;

You can have any one site of your choice respond for HTTP/1.0 agents by adding an empty hostheader (no sub.hostname.tld in it) mapped to port 80 to it
This site will also respond to as well.

Add a "default site" with no hostheader defined and have an index page in it that simply says "No websites are configured at this address" or some other message of your choice.

You could have this scripted and make it return a 404 response as well should you so wish.

The server cannot respond automatically because there is no default site that can or will respond to requests with no "hosts" field.









Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
IC, resistance is futile eh? [borg2]

So when you talk about blank host header, you mean no sub domain.

I need to add the domainname.TLD without the default sub domain of gotcha

default index.html also added , thanks.

Any chane you could now check it works ok, or do I need to go ask Randy?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
So when you talk about blank host header, you mean no sub domain.
No, I mean nothing.

No sub, No hostname, no tld

Just the IP (or all assigned) and the port no (80)


You can download WebBug and check yourself as well.



Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
so you mean default website?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top