[Pdns-users] redirect a search for one site to another site
bert hubert
bert.hubert at netherlabs.nl
Sat Dec 25 22:28:09 UTC 2010
On Sat, Dec 25, 2010 at 05:13:47PM -0500, Morgan Osborne wrote:
> The first is 'red.com' with a record type of 'CNAME' and content of
> 'blue.com' , then the second record is 'blue.com' with a record type of
> 'A' and the correct IP address of '150.145.15.1' So now when I do a http
> search for 'red.com' I get to the error site of '150.145.15.1' and not all
> the way to the site of 'blue.com'
Morgan,
This is indeed how DNS works. A CNAME works 'behind the scenes'. What you
are looking for is a HTTP-level redirect such as a 301 or 302 directive.
This will instruct the browser to go 'all the way' to blue.com.
For Apache, this is documented on
http://httpd.apache.org/docs/current/mod/mod_alias.html
> 1. I am not inserting the records correctly, or using the wrong record types
>
> 2. The CNAME does not send back to the http search the 'blue.com' name so
> when it gets to site '150.145.15.1' it does not know what to look for (and
> is probably looking for 'red.com' instead of 'blue.com' and thats why I
> get the error page)
>
> 3. I should not be using CNAME for a redirect, but some other record type
>
> 4. or, the Aliases in the record is interrupting the search somehow on '150.145.15.1'
'2' is the one you are looking for.
Good luck!
More information about the Pdns-users
mailing list