What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

See topic. This behaviour appears to be common across all sites. Tested on:

  • stackoverflow.com
  • serverfault.com
  • superuser.com
  • programmers.stackexchange.com

Curl output (with headers only) below.

Test 1 - with trailing dot:

% curl -I www.stackoverflow.com.
HTTP/1.1 400 Bad Request
Content-Length: 334
Content-Type: text/html; charset=us-ascii
Date: Sat, 18 Dec 2010 21:06:17 GMT

% curl -I stackoverflow.com.
HTTP/1.1 400 Bad Request
Content-Length: 334
Content-Type: text/html; charset=us-ascii
Date: Sat, 18 Dec 2010 21:08:34 GMT

Test 2 - without trailing dot:

% curl -I www.stackoverflow.com 
HTTP/1.1 301 Moved Permanently
Content-Length: 148
Content-Type: text/html; charset=UTF-8
Location: http://stackoverflow.com/
Date: Sat, 18 Dec 2010 21:07:48 GMT

% curl -I stackoverflow.com 
HTTP/1.1 200 OK
Cache-Control: public, max-age=60
Content-Length: 195426
Content-Type: text/html; charset=utf-8
Expires: Sat, 18 Dec 2010 21:08:54 GMT
Last-Modified: Sat, 18 Dec 2010 21:07:54 GMT
Vary: *
Date: Sat, 18 Dec 2010 21:07:53 GMT

Update: The fact that many applications add the trailing dot implicitly doesn't remove the fact that a domain name isn't considered fully qualified unless the trailing dot is present. See the wiki page and RFC1535 as to why this matters.

In any case; a URL with a trailing dot on the FQDN is a well formed request. Is there any reason you believe it shouldn't be supported?

share|improve this question
I don't think Stackoverflow runs on Linux/Apache (meta.stackexchange.com/questions/10369/…), so its runtime may not follow all RFCs to the letter. –  mario Dec 18 '10 at 22:36
I support following standards but I'm really straining to care in this case. You linked to a good explanation of why it's worth fixing eventually though, so +1 –  Brad Mace Dec 19 '10 at 1:25
add comment

1 Answer

OK, so.. maybe don't enter an unnecessary period on the end of URLs?

share|improve this answer
@Jeff: In what way is it unnecessary? A hostname isn't fully qualified unless it includes the trailing dot and the implicit null root label. Without the trailing dot, users are vulnerable to all sorts of issues relating to incorrectly configured DNS search paths. en.wikipedia.org/wiki/Fully_qualified_domain_name –  Murali Suriar Dec 18 '10 at 21:52
@murali p.s. try the above on asp.net and you might find out something surprising –  Jeff Atwood Dec 18 '10 at 21:57
@jeff: That doesn't surprise me in the least; it also doesn't make it any less wrong. google.com. doesn't seem to have any issues... –  Murali Suriar Dec 18 '10 at 22:04
@jeff interesting - is this a side effect of hosting multiple domains in a single IIS instance (ie it's matching hostname and failing) or is it any IIS website? –  Basic Dec 18 '10 at 22:34
Patient: "Doctor, it hurts when I do this!" Doctor: "Don't do that." –  Bill the Lizard Dec 18 '10 at 23:01
@Bill: specious analogy. If this gets marked "won't fix, vendor platform issue, workarounds acceptable", then fair enough. I've yet to hear a reasonable argument as to why this isn't a bug though. (I'm not sure who is who in your example, to be honest. I tend to view RFCs as a fairly good source of advice, myself. :P) –  Murali Suriar Dec 18 '10 at 23:25
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .