how do you auto redirect a url using dns

i have a small issue at our office, we set up domain names in our dns eg. xxx.abc.com or def.acb.com or lkjh.abc.com and they all work fine. however some of our sales staff are giving out www.xxx.abc.com 
www.def.abc.com etc etc (they are putting in a www thus adding a 4th level)

i am trying to find out how just using DNS we can force the site to drop the www portion

the site is hosted on IIS6.0 on a win 2k 2003 box
aclvAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DanJournoCommented:
Theres no way to do this via DNS alone.

If you point www.xyz.abc.com to a webserver, you could use an ASP script to redirect the user to the correct site.
Either this code or the code below the dashes should redirect if you put it into an asp script.
<%
response.redirect("http://" & mid(Request.ServerVariables("HTTP_HOST"),instr(Request.ServerVariables("HTTP_HOST"),".")))
%>
---------------------------
<%
response.redirect("http://" & mid(Request.ServerVariables("HTTP_HOST"),instr(Request.ServerVariables("HTTP_HOST"),".")+1))
%>

Sorry this wasnt the answer you were looking for.

Dan
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aclvAuthor Commented:
will that code strip away the www portion. the issue is we have one large site. with several abc.domain.com
def.domain.com
ghi.domain.com

all point to one website/

and some users are like i said putting in www. infront of it.  


so its one
0
DanJournoCommented:
That code should strip out the www and forward the user to the address they really wanted to go to.

If it doesnt, let me know what happens and i'll adjust the code.

Take care
Dan
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

pathsnifferCommented:
You could use DNS entries to get the desired result.

Just create Pointer Records in your DNS zone data

Create a Alian (CNAME) in your DNS server with asterik (*). e.g. *.xxx.abc.com -> xxx.abc.com.
This way when you type www.xxx.abc.com it will automatically redirected to xxx.abc.com.
i.e. www.xxx.abc.com -> xxx.abc.com
0
DanJournoCommented:
pathsniffer,
That wont get redirected. That will simply give the www. domains, the same IP as the abc domain.

Dan
0
pathsnifferCommented:
Dan,
I agree it will evaluate to the same IP but it will also cause the web browser to redirect its request to that IP. hence the www.xxx.abc.com request will go to xxx.abc.com.

I have done it and it work and Microsoft in it SBS 2003 server uses the same concept to redirect the domain users to Sharepoint portal server "companyweb".

aclv,
The only thing you might have to do it you have hosted all the domain/sub domains on the same server is to make Host Header entries in IIS.
0
DanJournoCommented:
Pathsniffer,

Although i agree that your solution will work, it does not match up with ACLV's request.
He wanted the www to be stripped out.

Dan
0
sravsCommented:
Aclv,  Are you looking for anything.yourdomain.com should point one website
0
sravsCommented:
if yes.... which DNS server your using ?
0
aclvAuthor Commented:
sravs,  yes they all point ot one website , the issue is that some people put in the www.sub.yourdomain.com and then the ssl says its not valid.  as the ssl is for *.yourdomain.com
we are using godaddys dns manager so i am not sure what the dns is running on.
0
sravsCommented:
not sure what kind of options godaddy gives.

but if you check below. 4th level of subdomain also can point to the same website.
http://www.xyz.bloodsavelives.org/
http://xyz.bloodsavelives.org/
0
sravsCommented:
Check if your Hosting provider can allow you add entry like below thru DNS Management

*.def.acb.com

It worked for me on Tiny dns.


0
aclvAuthor Commented:
all our web domains point to the same site now, the issue is having it strip out the www
so when you type in say "http://www.xyz.bloodsavelives.org/" it would just redirect to: http://xyz.bloodsaveslives.org  
 
 
0
DanJournoCommented:
I suggest evenly splitting the points if the member doesnt respond.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.