Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to redirect every incoming request via A record to another server (url-shortening service) unless the root is requested.... Is this possible? If so, how? If not, why not?

A simple example of what I'm talking about:

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

No; DNS cannot do HTTP redirects.

A DNS name is always resolved before HTTP communication even starts, and has no visibility into what URL is being requested.

However, I don't see why an HTTP redirect wouldn't work just fine for this case.

Can you clarify why you want DNS to be involved in the redirect?

share|improve this answer
    
I honestly don't know that it's a necessity to have DNS involved. The service I'm using says to specify the A record, but if you think the HTTP redirect will suffice then I will try it. –  ServAce85 Feb 6 '12 at 17:05
    
Just wanted to let you know that this worked perfectly. Thanks @Shane –  ServAce85 Feb 6 '12 at 19:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.