Forum Discussion

Abubakar_Siddiq's avatar
Abubakar_Siddiq
Icon for Nimbostratus rankNimbostratus
Jan 28, 2025
Solved

remove www from domain

Hello Everyone, Could you please assist for below query how it will be achieved.   We have a query where the customer wants to remove the www from the request. for example requested comes to https...
  • Mayur_Sutare's avatar
    Feb 06, 2025

    Hi Abubakar_Siddiq 

     

    You can achieve your requirement using iRule as well as LTM policy.
    One of the sample iRule is given here ( Ref article ).

    In the reference example, it is redirecting from one domain to other with URI translations also.
    You can draft iRule according to your use case and use it. You can club both host and URI redirections in the same irule or keep it separated based on how do you want to manage it.

    Also, make sure your application is also accepting requests using redirected host. I have seen few cases where, app team hardcode their application to accept for specific host requests only.

     


    IMP - You need to make sure that certificate configured on the F5 should be valid for "abc.com" domain also. If it is only valid for "www.abc.com" and you redirected traffic to "abc.com" with same certificate. Client will start getting certificate error warnings.

    So you need to take this point into consideration before redirecting requests.

     

    Hope it helps!