Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CNAME question 1

Status
Not open for further replies.

immorall

MIS
Feb 12, 2008
2
US
Usually when you create a CNAME, you associate a different name with a host in one of your zones. For instance, points to the actual server web1.mydomain.com. However, how would you create a cname record where it pretty much just redirects you to another web site. In other words..when a user types in it actaully goes to
 
If you are in charge of the domain, you can point anywhere you want.

The problem would be that (in the case of a webserver) if it were running virtual host in which it queried the URL to see what server is matching, the request to
might be different from
as interpreted by the web server on the remote end. But that isn't a DNS problem, that is a configuration thing on the server end.

eugene
 
Maybe Im not asking the question right. Lets say my company has our web site hosted by another company. Now, our dns namespace is for example The company that hosts are web site has a namespace of Now, I want my users to be able to type in their web browser and be redirected to Now, in my DNS server, if I create a CNAME record, it asks me for the alias name. In this example, that would be Then it asks for the FQDN of the actual server that will server the web page. Now, normally you would type if the FQDN of your web server (for example: web1.mycompany.com) if it was hosting the web page. However, we dont own the web server and the server isnt in our zone at all. So how do I enable it so clients are redirected to a when they type in our address of
 
elgrandeperro said:
But that isn't a DNS problem, that is a configuration thing on the server end.

immorall said:
I don't belive you can have a CNAME point to a directory though.

I concur. On both counts.

CNAMEs are good for "aliasing" the host name of the FQDN. Anything after the top level domain is handled by the server (apache, IIS or the like).

You're dealing with two different technologies. DNS for name resolution and a server component to handle the URL rewrite.

Have fun!

[pipe]
 
There are 3 ways to fix this.

The first is to tell the hosting company to do some rewrite rules that rewrite to
If they can't/won't do that, you can bring up an apache server. Repoint your to that site.

Your apache server can just do a redirect to that path (or rewrite, whatever you feel comfortable.)

If you aren't comfortable with httpd.conf, then the index page for (on your apache server) can simply do a meta refersh to the new URL, which is a stub page that automatcally redirects.

eugene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top