I want to have requests for the www
subdomain or for alternate top-level domains redirected to one canonical URL.
To avoid HTTP/HTTPS issues, I figured the easiest way would be to just send a scheme-relative URI in the Location header, like so:
HTTP/1.1 301 Moved Permanently
Location: //example.com/
This seems to work fine in browsers, but the toy »validator« at http://no-www.org/ does not handle it correctly. Is this just a single badly written script, or is this behavior actually more common in scripts, crawlers, etc. out there?