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?

  • 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, 2010 at 22:36
  • 1
    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, 2010 at 1:25

1 Answer 1


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

  • 1
    @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 Dec 18, 2010 at 21:52
  • @murali p.s. try the above on asp.net and you might find out something surprising Dec 18, 2010 at 21:57
  • 2
    @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... Dec 18, 2010 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, 2010 at 22:34
  • Patient: "Doctor, it hurts when I do this!" Doctor: "Don't do that." Dec 18, 2010 at 23:01
  • 3
    @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) Dec 18, 2010 at 23:25

You must log in to answer this question.

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