Forum Discussion

kridsana's avatar
kridsana
Icon for Cirrocumulus rankCirrocumulus
Jan 17, 2018

Is CNAME really a redirect method ?

Is CNAME really a redirect method ?

 

We have CNAME record like this. [ a.example.com IN CNAME b.login.aws.com ]

 

and b.login.aws.com is also CNAME of s3-website-west-1.amazonaws.com

 

When We enter URL "b.login.aws.com" in browser. It's working fine.

 

But When We enter URL "a.example.com" in browser. It's show 404 error and Code: NoSuchBucket error.

 

Can CNAME redirect URL which we input to another URL? If not, Can GTM help this case? or I need to config webserver to handle a.example.com.

 

Thank you

 

  • Dns name to IP address is handled by system. Http request is handled by browser!

     

    Browser is not aware if there is a DNS CNAME.

     

  • Hello kridsana,

     

    As evoqued Stanislas The dns part is independent of the requested part.

     

    To make it simple, when you enter "a.example.com" in your browser, the DNS resolution is done by the system. but in no case a redirection is done by dns or browser.So CNAME can't redirect URL which we input to another URL...

     

    If your service is hosted by F5, you can set a rule to allow you to redirect your request to another host.

     

    but if this is not the case you have to find you have to find other solutions. I do not think that's the best solution, but you can for example hosted a service in F5 for host "a.example.com" and juste implement a redirection on host "b.login.aws.com". the other solutions is to see the side of your host so that he can make the configuration necessary to accpter the host "a.example.com".

     

    But I'm not sure that in this case, GTM can help you because all it will do is return an IP and never redirect you...

     

    let me now if I can help you.

     

    Regards