Link to home
Start Free TrialLog in
Avatar of Kenneth Gwin
Kenneth Gwin

asked on

Problem adding a public redirect or alias to a specific address inside a certain area on our partners website. If private I can share specific links.

Having trouble creating a DNS redirect in BIND DNS manager.
We have a domain (I will not use the real domain name in my examples.  

ourdomain.com

We have many aliases like
mail.ourdomain.com     ->     oulook.office365.com.
publicknowledge.ourdomain.com     - >      publicknowledge.help.docs.blablabla.com.

Im having trouble with adding this alias address
somthing.ourdomain.com     ->     appt.SomeoneElsesDomain.com.schedule.appointment?labcard=false&reasonforvisit=PHLEBOTOMY
The destination usually looks like this.  https://appt.SomeoneElsesDomain.com/schedule/appointment?labcard=false&reasonforvisit=PHLEBOTOMY

I get an error that the name is too long.  not sure how to move forward or figure out a way to do this.  
Thanks for any assistance.
Avatar of noci
noci

You CANNOT redirect using DNS .

DNS is for translating hostnames into IP addresses/     so example.com can become 192.0.2.5
The browser can then connect using  that IP address to the target system.

I have no idea why peopl think DNS can do more....

To redirect you need a 301 or 302  redirect from a webserver.
Avatar of Kenneth Gwin

ASKER

Noci
Maybe I am using the wrong term.  Let me tell you that DNS server is more than resolving example.com to an IP address.  You shouldn't be so quick to show frustration.  
In our DNS server we have aliases that point a name like mail.mycompany.com to www.office.com hence someone types in mail.mycompany.com and the DNS server points them to www.office.com. Thats what I mean by redirect.  I do understand there is web based redirect but that is not the only way.
Please show HOW the DNS redirect looks like.... (full detail).
The RFC's describing  DNS (Domain Name System / Domain Name Service)   on caters for several records to allow translations of names to numbers...
You can start from the most recent RFC:  
https://tools.ietf.org/html/rfc8499   <- naming
https://tools.ietf.org/html/rfc1034   <- DNS system overview
https://tools.ietf.org/html/rfc1035   <- DNS implementation details
Also check the updates....

Wikipedia summary:
https://en.wikipedia.org/wiki/Domain_Name_System


mail.mycompany.com can be a CNAME to outlook.office365.com this is still within the realm of DNS . it just directs the name resolver  theat is mail.mycompany.com is user to look up the next name www.office.com until the ultimate requested RR (resource record) is found. f.e. a TXT, AAAA or A record.  
For mail there are so called MX record to point a domain to the mail servers to be used for that domain.

DNS does know of:  A, AAAA, NS, CNAME, DNAME, SOA, TXT, PTR, SRV, MX, CAA,  TLSA, RRSIG, DS, NSEC, NSEC3 and a few more. (you can even add custom names).
Web browsers only care for A & AAAA.   (and consequenty for their query CNAME/DNAME).

There are a FEW DNS providers that for convenience allow for a webserver on THEIR premises to be configured through special PSEUDO DNS records (because they use DNS RR editors on their databases).  From these databases the DNS RR's are derived as well as the Webserver config
for the redirects.

DNS lookup is done by starting from the root...
say www.example.com   then the root servers are sought (.)    from those servers the COM records are sought, from there  EXAMPLE from there WWW
through the use of  NS / A records to follow the path.

You can see the mechanism in action using dig +trace mail.outdomain.com    for your name.  dig is the specific tool of the traid to do DNS queries.
When someone types in quest.mycompany.com I need it to send them to
https://appointment.questdiagnostics.com/schedule/appointment?labcard=false&reasonforvisit=PHLEBOTOMY

In the example above, quest.mycompany.com does not exist.  The 2nd address does exist.  
We have existing forwards in our DNS server like this but the address is not so long.  Is my destination address too long? Thats what my BIND DNS server tells me when I try to add it.
What RR are you using for the redirects?

From RFC 1035 (not too hard to find):

2.3.4. Size limits

Various objects and parameters in the DNS have size limits.  They are
listed below.  Some could be easily changed, others are more
fundamental.

labels          63 octets or less

names           255 octets or less

TTL             positive values of a signed 32 bit number.

UDP messages    512 octets or less

the maximum segment length can be 255 bytes.  

one octet is 8 bits aka a byte.
ASKER CERTIFIED SOLUTION
Avatar of Kenneth Gwin
Kenneth Gwin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial