Windows DNS -- possible to create record redirects user to images.google.com?

Cerulean

[H]F Junkie
Joined
Jul 27, 2006
Messages
9,476
Greetings,

This is a DNS-question. With the many DNS record types there are, is it possible to create a record 'images' that would redirect the user to images.google.com? I tried creating a CNAME that points to images.google.com, but it would only keep bringing me to a Google search results page for image (I'm using Chrome). :(

Yeah, I know, I'm lazy. :D

Alternatively I can create an Alias record pointing to a webserver, create a website in IIS, and put up a simple HTML page that uses a meta redirect to http://images.google.com/
 
It's likely that your web browser is your problem.

DNS is a wicked simple thing, and a CNAME is the right way to do it.
 
whatever you set your min TTL to is how long you need to wait.

If it doesn't work after that, you'll need to set your DNS search suffix.
 
You can see that it won't work:

nslookup images.google.com

Non-authoritative answer:
Name: images.l.google.com
Addresses: 2607:f8b0:4006:802::1006
173.194.43.4
Aliases: images.google.com

telnet 173.194.43.4 80

GET http://images/ HTTP/1.1


HTTP/1.1 302 Found
Location: http://www.google.com/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Sat, 16 Mar 2013 02:03:48 GMT
Server: sffe
Content-Length: 219
X-XSS-Protection: 1; mode=block

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<T
ITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HR
EF="http://www.google.com/">here</A>.
</BODY></HTML>

Not too sure, but my guess it that since the Google Apps platform relies on URIs and certificates for pretty much everything, the "googlers" don't want anyone to believe that you can randomly change a URI without breaking things, or that it's okay to get a lot of certificate warnings.
 
The browser sends the hostname of the URL you enter as the value of the Hostname: header, not the hostname the CNAME points to.

You're doing this at the wrong layer. Just make a bookmark with a keyword.
 
Yes, but in normal cases that is fine because the server returns a 301 or 302 moved with the correct hostname. Google simply chooses to direct every "unusual" URI to www.google.com for whatever reason.
 
Quote the RFC where this is documented, please.
Not sure exactly what you mean - it's neither a standard nor recommended, but most sites that have a CNAME for www -> root works this way. As an example, GET www.wikipedia.com returns 301 found www.wikipedia.org.

Otherwise, assuming CNAME www -> example.com, how would the browser find the correct page? It would send GET www.example.com and the server would return 404 not found.

The problem is that to interact with most services these days, you need an (IP,port,URI) triplet. And the triplet would need to be accompanied by a certificate signing chain. Then Crulean would be able to sign Google's cert, and, as long as your browser trusts Crulean and Google, the redirection would work.

There is no real "layer" that associates names to such triplets. The closest thing would be some protocols that use DNS TXT or DNS SRV.
 
Last edited:
RFC2616

14.23 Host

The Host request-header field specifies the Internet host and port
number of the resource being requested, as obtained from the original
URI given by the user or referring resource

What you need to do is setup a webserver that forwards the user to images.google.com, as Google's server isn't configured to accept requests for images.yourdomain.com.
 
Back
Top