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:

link|improve this question
feedback

1 Answer

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?

link|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 at 17:05
Just wanted to let you know that this worked perfectly. Thanks @Shane – ServAce85 Feb 6 at 19:21
feedback

Your Answer

 
or
required, but never shown

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